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
Validate format of timeZone before calling system LoadLocation method #115375
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: liggitt 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 |
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
It seems there are a few cases which are failing:
|
/test pull-ci-kubernetes-unit-windows |
The test failed on Linux and passed on Mac. |
The reason seems to be that |
America/Ciudad_Juarez
Europe/Kyiv |
92896a1
to
7e19850
Compare
those were added after go1.19 was released, pruned the unit test to just valid timezones as of go1.19 release, and imported "time/tzdata" to the unit test to mitigate cross-platform differences |
/test pull-ci-kubernetes-unit-windows |
/lgtm |
LGTM label has been added. Git tree hash: 0bd154075557473648178cf7082c6ea85db304e0
|
Unit tests passed on Mac, windows, and Linux |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Adds format validation of time zones ahead of calling the LoadLocation system-dependent method.
This insulates us from platform differences in handling of edge case values (xref #114508 (review))
A unit test ensuring all listed IANA time zones pass this validation is added.
Updates of CronJobs which do not change time zone values are already tolerated.
Which issue(s) this PR fixes:
Makes CronJob validation behavior more consistent across platforms.
Does this PR introduce a user-facing change?
cc @soltysh @claudiubelu