awx icon indicating copy to clipboard operation
awx copied to clipboard

Complex schedules UI

Open keithjgrant opened this issue 2 years ago • 6 comments

SUMMARY

Adds ability to set more complex patterns in schedule - multiple recurring patterns can be built together (e.g. an hourly AND a daily recurrence)

  • ability to add exceptions is forthcoming (e.g. run daily EXCEPT on certain dates) (#12542)
ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • UI

keithjgrant avatar Jun 30 '22 17:06 keithjgrant

~~This has some minor cleanup remaining, but~~ I'd like to get some eyes on it now. The logic to add "Exceptions" fields is still TODO in a follow-up PR (and a little bit of it is here now, just commented out)

keithjgrant avatar Jul 12 '22 21:07 keithjgrant



Test summary

648 11 774 6Flakiness 4


Run details

Project AWX - Functional
Status Failed
Commit 1d05354910
Started Jul 18, 2022 6:44 PM
Ended Jul 18, 2022 10:15 PM
Duration 30:40 💡
OS Linux Debian - 11.3
Browser Chrome 99

View run in Cypress Dashboard ➡️


Failures

job-templates/job-template-tabs.spec.js Failed
1 Job Templates Tab- Schedules > Can add prompted fields and survey to a scheduled JT
2 Job Templates Tab- Schedules > Can add prompted fields and survey to a scheduled JT
projects/project-tabs.spec.js Failed
1 Project - Schedules Tab > can edit an existing schedule
schedules/schedule-crud.spec.js Failed
1 Create a schedule > can create a schedule from the schedules tab and verify that the date picker functions properly
2 Edit schedule form > can edit a schedule to use a different kind of frequency
3 Edit schedule form > can cancel editing a form without changes to the schedule
projects/project-list.spec.js Failed
1 Search operations - Projects > can sort Projects by name after performing advanced search
2 Project list navigation and sort > can cancel a project sync
user-journeys/normal-user-journey.spec.js Failed
1 Activity stream > a normal user should be able to see only allowed events
projects/project-crud.spec.js Failed
1 Delete Project > can delete a project and see all dependencies related to this project
This comment includes only the first 10 test failures. See all 11 failures in the Cypress Dashboard.

Flakiness

credentials/credential-crud.spec.js Flakiness
1 Credentials- Upload > can upload a json file that will clear out current values of all 3 fields and then add values from the file
jobs/job-list.spec.js Flakiness
1 Search operations - Jobs > can perform basic search for Jobs by Name
job-templates/job-template-list.spec.js Flakiness
1 Job Template Operations- form validation > can correct form field errors including variables field and successfully create a JT
job-templates/job-template-surveys.spec.js Flakiness
1 Surveys- Form > can create a survey type textarea

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar Jul 18 '22 18:07 cypress[bot]

@keithjgrant I've started to look at this. First, this work is amazing and is a great leap forward in helping customers automate more.

I did want to note 1 thing:

  • [ ] If you create and turn on a survey and create and turn on a schedule, then return to the survey to turn it off, and then return to edit the schedule you cannot edit the schedule without clicking on prompt. This is a problem, because the survey is off and should not impede the ability to save/edit a schedule -[ ] The repeat frequency field keeps track of how many items the user has clicked on, but now which items those are. Shouldn't we show chips there? Screen Shot 2022-07-20 at 2 13 05 PM
  • [x] Also looks like Repeat Frequency label is not marked for translated Screen Shot 2022-07-20 at 2 22 29 PM
  • [ ] I'd be cautious about using abbreviations for the days of the week because they may not translate properly
  • [x] This frequency schedule (weekly and monthly, with repeats on both) results in a Repeat frequency of yearly on the details view, with the first and next run fields containing the wrong value. Screen Shot 2022-07-20 at 2 24 39 PM Screen Shot 2022-07-20 at 2 22 29 PM

AlexSCorey avatar Jul 20 '22 15:07 AlexSCorey

feedback after manual testing:

  • [ ] some time zones are showing the following text upon being selected on the form: Warning: {selectedValue} is a link to {0} and will be saved as that.
  • [x] some time zones show up one way when selected in the form but change after the user saves the form. Example: America/Toronto saves and shows up as Canada/Eastern
  • [x] consider providing more explicit information on the schedules detail page about what the user stipulated on the schedule form
  • [x] in the form field on the following snippet, I feel like a better user experience would be for actual names of intervals to show up (minute, hour, etc) instead of numbers image

akus062381 avatar Jul 20 '22 20:07 akus062381

I'm seeing some errors in the console that we'll probably want to resolve. When trying to edit a management job (5, Cleanup Expired OAuth 2 Tokens https://localhost:3001/#/management_jobs/5/schedules/5)

  1. When you select the repeat frequency dropdown I get this error: Screen Shot 2022-07-20 at 2 26 25 PM

  2. I cannot select a day when trying to create a weekly frequency and get this error: Screen Shot 2022-07-20 at 2 24 21 PM

kialam avatar Jul 20 '22 21:07 kialam

Changes up and ready for review. I've updated the Details page with a full schedule breakdown for run frequencies. Some other thoughts/replies to specific comments below:

  • If you create and turn on a survey and create and turn on a schedule, then return to the survey to turn it off, and then return to edit the schedule you cannot edit the schedule without clicking on prompt. This is a problem, because the survey is off and should not impede the ability to save/edit a schedule

@AlexSCorey This appears to be an existing bug in devel. I filed #12585 to track it

  • Also looks like Repeat Frequency label is not marked for translated

@AlexSCorey it is marked, but I haven't run extract-strings and compile-strings, so this should get picked up when we run them for the next release

  • The repeat frequency field keeps track of how many items the user has clicked on, but now which items those are. Shouldn't we show chips there?

@AlexSCorey I tend to agree, though the current approach matches mockups & patternfly component for multiselect. We can definitely discuss/revisit later

  • some time zones are showing the following text upon being selected on the form: Warning: {selectedValue} is a link to {0} and will be saved as that.

@akus062381 This is a translation/string replacement issue. These are replacing normally in my local environment, though. Any idea why they would be different in your instance?

I'm seeing some errors in the console that we'll probably want to resolve. When trying to edit a management job (5, Cleanup Expired OAuth 2 Tokens https://localhost:3001/#/management_jobs/5/schedules/5)

@kialam I couldn't reproduce these, though I suspect they are resulting from a particular format of a schedule created in previous version. I updated those two lines to handle undefined/null values.

keithjgrant avatar Jul 27 '22 23:07 keithjgrant