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

Backport of build: load time/tzdata on Windows into release/1.5.x #18687

Merged
merged 1 commit into from
Oct 6, 2023

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #18676 to be assessed for backporting due to the inclusion of the label backport/1.5.x.

The below text is copied from the body of the original PR.


Nomad uses time.LoadLocation() to translate a periodic job time zone string value to a time.Location. From godocs:

LoadLocation looks for the IANA Time Zone database in the following locations in order:

* the directory or uncompressed zip file named by the ZONEINFO environment variable
* on a Unix system, the system standard installation location
* $GOROOT/lib/time/zoneinfo.zip
* the time/tzdata package, if it was imported

So non-Unix systems require Go to be installed or time/tzdata to be imported, otherwise running periodic jobs with a specific time_zone value results in an error:

Invalid time zone "America/Toronto": unknown time zone America/Toronto

This commit adds the timetzdata build tag on Windows to embed the time zone data into the final binary. This results in a slightly bigger binary, but from time/tzdata godocs:

Importing this package will increase the size of a program by about 450 KB.
[..]
This package will be automatically imported if you build with -tags timetzdata.

Closes #18578


Overview of commits

@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/ci-win-tzdata/hugely-finer-ringtail branch from 497e35b to dcdcd0a Compare October 6, 2023 16:58
@hc-github-team-nomad-core hc-github-team-nomad-core force-pushed the backport/ci-win-tzdata/hugely-finer-ringtail branch from 19b1a84 to 92c60ca Compare October 6, 2023 16:58
@vercel vercel bot temporarily deployed to Preview – nomad October 6, 2023 17:03 Inactive
@vercel vercel bot temporarily deployed to Preview – nomad-storybook-and-ui October 6, 2023 17:08 Inactive
@lgfa29 lgfa29 merged commit b6736cf into release/1.5.x Oct 6, 2023
22 of 25 checks passed
@lgfa29 lgfa29 deleted the backport/ci-win-tzdata/hugely-finer-ringtail branch October 6, 2023 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants