Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a numerical input to Create Periodic Scheduled Runs #1768

Merged

Conversation

dpanshug
Copy link
Contributor

@dpanshug dpanshug commented Sep 8, 2023

Closes: #1244

Description

Added a feature to include numerical input to create Periodic Scheduled Runs on side of dropdown to select time unit.

After creating run, the output is like (no change to this page)

Screenshot from 2023-09-08 15-15-02

How Has This Been Tested?

  1. Create a pipeline server and import a pipeline.
  2. Click on "Runs" tab on sidebar.
  3. Click "Create run".
  4. Fill the required information
    • Choose "Schedule recurring run".
  5. Choose Trigger type "Periodic" and enter time value in text field below "Run every" and choose time unit.
  6. Click on "Create"
  7. At "Scheduled" tab, you can see the run created with time mentioned below "Trigger".

Test Impact

Added unit test to test string and time utility functions.

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Commits have been squashed into descriptive, self-contained units of work (e.g. 'WIP' and 'Implements feedback' style messages have been removed)
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit tests & storybook for related changes)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change (find relevant UX in the SMEs section).

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

cc @yannnz

Copy link
Contributor Author

@dpanshug dpanshug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions I want

frontend/src/__tests__/unit/utils/string.spec.ts Outdated Show resolved Hide resolved
frontend/src/__tests__/unit/utils/string.spec.ts Outdated Show resolved Hide resolved
frontend/src/__tests__/unit/utils/time.spec.ts Outdated Show resolved Hide resolved
frontend/src/__tests__/unit/utils/time.spec.ts Outdated Show resolved Hide resolved
frontend/src/utilities/time.ts Outdated Show resolved Hide resolved
@andrewballantyne
Copy link
Member

@dpanshug Why WIP label? I don't see a reasoning... perhaps use [WIP] as a prefix to your PR title instead, when you rename your PR it auto will add/remove that label. I'll put some docs together about this.

/hold
Also going to throw a hold on this PR to prevent a feature from merging after feature freeze. Look out for threads like this to help us flag for things that you're working on that you might want to get in by feature freeze of a given release.

@openshift-ci openshift-ci bot added the do-not-merge/hold This PR is hold for some reason label Sep 29, 2023
@dpanshug dpanshug changed the title Add a numerical input to Create Periodic Scheduled Runs [WIP] Add a numerical input to Create Periodic Scheduled Runs Oct 6, 2023
@dpanshug dpanshug changed the title [WIP] Add a numerical input to Create Periodic Scheduled Runs Add a numerical input to Create Periodic Scheduled Runs Oct 10, 2023
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress This PR is in WIP state label Oct 10, 2023
@andrewballantyne
Copy link
Member

/unhold

After feature freeze

@openshift-ci openshift-ci bot removed the do-not-merge/hold This PR is hold for some reason label Oct 11, 2023
Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 is an odd default... can we do something better than that? @yannnz do we want a singular default? 1 Minute, 1 Hour, 1 Day, 1 Week? (1 Minute is really low though)...

@dpanshug you can submit at 0 -- this is weird. I can't imagine 0 being a valid value... can we not make the min >0?

image

@dpanshug Is there a need to have such a wide input? Can we not make it shorter so 2-ish characters fit? This is always a number and the number of digits it has is probably no more than 3 if someone wants to do 100 minutes or something... but 1 or 2 is most common. Max I should see is 4 characters upon deselection.

Screenshot 2023-10-10 at 9 17 35 PM
Screenshot 2023-10-10 at 9 17 38 PM

@yannnz is this the desired design? Or do we want to look for a - / + & a space between the field and dropdown like we have on Model Serving modal:
image

@yannnz
Copy link

yannnz commented Oct 13, 2023

@andrewballantyne @dpanshug The default could be 1 week, because 1 min might cause some problem for the admin. For example, someone scheduled runs for testing with the default setting, and forgot to disable it. That is what happened several times in RedHat and Erwan even suggested to not have 1min.

@yannnz
Copy link

yannnz commented Oct 13, 2023

@andrewballantyne @dpanshug For the design, let's keep the space and number input to make it consistent with Model serving.

@andrewballantyne
Copy link
Member

andrewballantyne commented Oct 17, 2023

@dpanshug please update your description screenshots

@dpanshug dpanshug force-pushed the 1244-numerical-periodic branch 3 times, most recently from cc70a6d to 85ec0b9 Compare October 19, 2023 09:21
@openshift-ci openshift-ci bot added the lgtm label Oct 19, 2023
Copy link
Contributor

@manaswinidas manaswinidas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@dpanshug
Copy link
Contributor Author

This is ready for final review

Copy link
Member

@andrewballantyne andrewballantyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to handle the duplicate use-case... you don't update the value

@openshift-ci openshift-ci bot added the lgtm label Nov 27, 2023
Copy link
Contributor

openshift-ci bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, manaswinidas

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit cb7cc6f into opendatahub-io:main Nov 27, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add a numerical input to Create Periodic Scheduled Runs
7 participants