Skip to content

timeutil: embed Go time zone data into CockroachDB#56634

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:embed_tzdata
Nov 16, 2020
Merged

timeutil: embed Go time zone data into CockroachDB#56634
craig[bot] merged 1 commit intocockroachdb:masterfrom
otan-cockroach:embed_tzdata

Conversation

@otan
Copy link
Copy Markdown
Contributor

@otan otan commented Nov 13, 2020

Refs #36864

  • Use go's time/tzdata to embed timezone data.
  • Modify timeutil package to always use this package.
  • Remove cli checks for tzdata.
  • Add lint rule to use timeutil.LoadLocation

The binary size changes by ~1MB here.

Release note (general change): The timezone data is now built in to the
CockroachDB binary, which is the fallback source of time if tzdata is
not located by the default Go standard library.

@otan otan requested a review from knz November 13, 2020 00:20
@otan otan requested a review from a team as a code owner November 13, 2020 00:20
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but can you investigate what the acceptance test is trying to tell you?

Also because of this PR we will now need to be more proactive about upgrading the go version that we use (or manually pull in new versions of tzdata into patch releases). What do you and @jlinder think about this? What's a good way to do this moving forward?

Reviewed 11 of 11 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Nov 13, 2020

pretty sure the acceptance test failure is because i forgot to update the builder image. sending that for a re-run.

Also because of this PR we will now need to be more proactive about upgrading the go version that we use (or manually pull in new versions of tzdata into patch releases). What do you and @jlinder think about this? What's a good way to do this moving forward?

feels like every major release from now on needs an explicit review of the embedded tzdata? i'm not totally sure what to answer here. it is a fallback in the end, so if users care about up-to-date tz data they would need to ensure their local tzdata packages are up to date.

@otan otan force-pushed the embed_tzdata branch 2 times, most recently from 0a85978 to c4c8938 Compare November 13, 2020 23:15
@otan
Copy link
Copy Markdown
Contributor Author

otan commented Nov 13, 2020

looks like the gce workers are go1.14. how do they get installed?

* Use go's time/tzdata to embed timezone data.
* Modify timeutil package to always use this package.
* Remove cli checks for tzdata.
* Add lint rule to use timeutil.LoadLocation

The binary size changes by ~1MB here.

Release note (general change): The timezone data is now built in to the
CockroachDB binary, which is the fallback source of time if tzdata is
not located by the default Go standard library.
@knz
Copy link
Copy Markdown
Contributor

knz commented Nov 16, 2020

I thought this was from scripts/gceworker.sh
which in turn runs build/bootstrap/bootstrap-debian.sh

but apparently there's already 1.15 in there.

Also I see your CI is fine now.

So I'd say you can probably merge this?

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Nov 16, 2020 via email

@otan
Copy link
Copy Markdown
Contributor Author

otan commented Nov 16, 2020

bors r=knz

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 16, 2020

Build succeeded:

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.

3 participants