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

Upgrade to robfig/cron/v3 to support time zone specification #7793

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kaovilai
Copy link
Contributor

@kaovilai kaovilai commented May 14, 2024

Breaking change (can be mitigated if needed in the future): v1 branch accepted an optional seconds field at the beginning of the cron spec. This is non-standard and has led to a lot of confusion. The new default parser conforms to the standard as described by the Cron wikipedia page.. It is unlikely that this affects us per #31

Other notes:

CRON_TZ is now the recommended way to specify the timezone of a single schedule, which is sanctioned by the specification. The legacy "TZ=" prefix will continue to be supported since it is unambiguous and easy to do so.

References: https://pkg.go.dev/github.com/robfig/cron/v3#readme-upgrading-to-v3-june-2019
Signed-off-by: Tiger Kaovilai [email protected]

Thank you for contributing to Velero!

Please add a summary of your change

Does your change fix a particular issue?

Fixes #7792

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@github-actions github-actions bot added Dependencies Pull requests that update a dependency file has-unit-tests labels May 14, 2024
@kaovilai kaovilai marked this pull request as ready for review May 14, 2024 20:52
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 58.67%. Comparing base (27392d3) to head (160a2e1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7793   +/-   ##
=======================================
  Coverage   58.66%   58.67%           
=======================================
  Files         345      345           
  Lines       28733    28739    +6     
=======================================
+ Hits        16856    16862    +6     
  Misses      10448    10448           
  Partials     1429     1429           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blackpiglet
Copy link
Contributor

Please check the failed cases in the CI action.

@kaovilai kaovilai marked this pull request as draft May 15, 2024 03:55
@kaovilai
Copy link
Contributor Author

It's not failing locally...

Breaking change (can be mitigated if needed in the future):  v1 branch accepted an optional seconds field at the beginning of the cron spec. This is non-standard and has led to a lot of confusion. The new default parser conforms to the standard as described by [the Cron wikipedia page.](https://en.wikipedia.org/wiki/Cron). It is unlikely that this affects us per vmware-tanzu#31

Other notes:
> CRON_TZ is now the recommended way to specify the timezone of a single schedule, which is sanctioned by the specification. The legacy "TZ=" prefix will continue to be supported since it is unambiguous and easy to do so.

References: https://pkg.go.dev/github.com/robfig/cron/v3#readme-upgrading-to-v3-june-2019
Signed-off-by: Tiger Kaovilai <[email protected]>
@kaovilai kaovilai marked this pull request as ready for review May 15, 2024 08:02
@kaovilai
Copy link
Contributor Author

@blackpiglet looks like it was a flaky test

@blackpiglet
Copy link
Contributor

Thanks.
Is this PR target for the v1.14.0 RC?
If not, how about revisiting this PR after the release-1.14 branch cut?

@kaovilai
Copy link
Contributor Author

Is this PR target for the v1.14.0 RC?
If not, how about revisiting this PR after the release-1.14 branch cut?

Sounds good.

@kaovilai
Copy link
Contributor Author

Not 1.14 target

@reasonerjt
Copy link
Contributor

Thanks @kaovilai
It would be great to make update to the doc to add an example for the more advanced format:
https://velero.io/docs/v1.14/backup-reference/#schedule-a-backup

But this is optional since it's briefly covered in the Wikipedia link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Pull requests that update a dependency file has-changelog has-unit-tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade robfig/cron Library to Support Time Zones
3 participants