-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
fix(cron): various follow-ups for multiple schedules #13369
fix(cron): various follow-ups for multiple schedules #13369
Conversation
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
argo cron list
and get
to show schedules without timezone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to split out the schedule
-> schedules
change #12616 (comment) into its own PR. That and the v3.6 and after:
and other #12616 review follow-ups can be merged pretty much immediately while you're still working out the test failures etc here. And the v3.6 and after:
portion is particularly useful for people who are looking at the latest
docs.
Also there was one miss from my previous review #12616 (review), the CronWorkflow docs page's fields table
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
whille implementing this, I also found that |
Is the CLI fix only relevant to 3.6? Or does it also impact 3.5/3.4? If these are all just follow-up fixes to the multiple If the CLI fix is relevant to 3.5/3.4, then I think we should split the rest out, so that it can be backported |
this only applies to 3.6 as it was introduced in #12616 |
I know |
the timezone in |
Ok gotcha, wanted to make sure since I hadn't reviewed that whole PR. Then let's just fix-up the title and description to include all follow-ups as one Also btw, no need to quote reply if you're replying to the whole thing in order. Quoting is useful for replying to parts at a time or out of order comments. In this case they read fluidly down and so quoting actually reads duplicatively (and if everyone does it, causes those massive quote of quote of quote of quotes). Forum kiddie me of the past is happy to have learned that lol |
{(w.spec.schedule ?? '') != '' | ||
? w.spec.schedule | ||
: w.spec.schedules.map(schedule => ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{(w.spec.schedule ?? '') != '' | |
? w.spec.schedule | |
: w.spec.schedules.map(schedule => ( | |
{w.spec.schedule || w.spec.schedules.map(schedule => ( |
this specific one can be further simplified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although tbh normalizing schedule
to a single element array of schedules
would be simpler to do everywhere
@eduardodbr, any chance that you'd have a chance to fix/update this so it can go into 3.6? We're currently missing the documentation on multiple |
Hi @Joibel will try to finish this ASAP, sorry for the delay |
argo cron list
and get
to show schedules without timezoneThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some notes on in-line deprecation and versions
I also updated the PR title and description per my previous comment
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Co-authored-by: Anton Gilgur <[email protected]> Signed-off-by: Eduardo Rodrigues <[email protected]>
Co-authored-by: Anton Gilgur <[email protected]> Signed-off-by: Eduardo Rodrigues <[email protected]>
Co-authored-by: Anton Gilgur <[email protected]> Signed-off-by: Eduardo Rodrigues <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating this! Just a small comment below
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
Signed-off-by: eduardodbr <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for iterating on this!
Looks like there's some test failures in CI |
Signed-off-by: eduardodbr <[email protected]>
Motivation
Currently
argo cron list
andargo cron get
are showing the schedules with timezone, when available. This PR removes it as it doesn't bring any value because it can be seen in thetimezone
field.Modifications
The schedule string can now be requested with and without the timezone.
With timezone, it is used for the annotation
last-used-schedule
, so changing the timezone while keeping the schedule will be seen as a new schedule.Without timezone, it is used in
argo cron
CLI.Also:
schedule
to beschedules
as suggested by @agilgur5 feat(cron): allow multipleschedules
#12616 (comment)schedules
#12616 (review)schedules
#12616 (comment)Verification
Current:
argo cron list
argo cron get
With this PR changes:
argo cron list
argo cron get
The
CronWorkflow
labellast-used-schedule
still uses the schedule with timezone