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

Fix timezone tests to take DST into account #1349

Merged
merged 1 commit into from
Mar 17, 2021
Merged

Conversation

sc1f
Copy link
Contributor

@sc1f sc1f commented Mar 15, 2021

In our suite of timezone tests, we set the timezone manually and assert that getTimezoneOffset is 300 (for EST). However, during Daylight Savings time (which started on Sunday, March 14th) the timezone offset is 240, and our tests did not take that into account. This PR fixes the issue and now should work for both DST and non-DST times.

yarn.lock Outdated Show resolved Hide resolved
@timkpaine
Copy link
Member

@sc1f looks like they mightve moved boost again on windows 🤦

@sc1f
Copy link
Contributor Author

sc1f commented Mar 16, 2021

@timkpaine PR build successful though, which is strange - let me bump the windows job

@sc1f
Copy link
Contributor Author

sc1f commented Mar 16, 2021

@timkpaine actions/runner-images#2667 welp - I will make a PR fixing this

@texodus
Copy link
Member

texodus commented Mar 16, 2021

Honest question - why do we depend on system boost for Windows instead of building the version we want as we do for wasm?

@sc1f
Copy link
Contributor Author

sc1f commented Mar 16, 2021

@texodus we don't have a docker image for windows; I think we may need the built boost and not just the headers, but I will check when I do the fix. There's no "system boost" - it's just that the image provides Boost for us as part of the toolchain. I agree though with @timkpaine below - that install_tools script would be good for Windows/Linux Python too, and that will go a long way in removing Docker images as a whole.

@timkpaine
Copy link
Member

timkpaine commented Mar 16, 2021

@texodus if you want to make that script cross-platform. we need the built boost so not worth to rebuild in CI every time, but if we had a reasonable image set up it would probably help (and we could build the image using just things like choco which would help us get around the annoying and rather bespoke nature of the azure build.

(it should be noted that the install script would only be usable on CI, and we don't build or distribute windows wheels, so having something approximate a lay-person's install is a good thing).

@texodus
Copy link
Member

texodus commented Mar 17, 2021

@timkpaine I made this change on the wasm workflow because I measured it was faster overall to build boost from source, as opposed to loading the Docker image, if you include cumulative build time saved from skipping the container. Ideally this will use Azure's cache to build boost once per week or so, but I've yet to get this part to work - regardless the total boost time is ~3min source which is longer than downloading the container by ~1min, but significantly faster to build perspective overall for wasm outside of the container. This won't translate 1:1 with Python but it won't be off by more than a handful of minutes on what is already a 20min Python build on CI, per version.

We may not need to actually build boost completely, but AFAIK boost headers are not linkable without the bootstrap and b2 steps here source.

@texodus
Copy link
Member

texodus commented Mar 17, 2021

Thanks for the PR!

@texodus texodus merged commit da04163 into master Mar 17, 2021
@texodus texodus deleted the fix-timezone-tests branch March 17, 2021 02:23
@texodus texodus added the internal Internal refactoring and code quality improvement label Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Internal refactoring and code quality improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants