Skip to content

Ensure we do not fail when CI leap second file is expired. - #9908

Merged
mhvk merged 2 commits into
astropy:masterfrom
mhvk:fix-leapsecond-system-file-test
Jan 30, 2020
Merged

mhvk merged 2 commits into
astropy:masterfrom
mhvk:fix-leapsecond-system-file-test

Conversation

@mhvk

@mhvk mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor

We are getting failures because travis does not quite keep its distribution up to date enough for leap second tests. So, this PR changes the test such that on CI if the leap second file is expired, the test is simply skipped. But if it is not expired, it checks that it is used.

cc @bsipocz, as it is something that should make your life that little bit easier!

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was just being baffled by this failure. Thanks for fixing it so quickly!

@pllim pllim added the zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now. label Jan 30, 2020
@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

Now if only it solved the failures...

@pllim

pllim commented Jan 30, 2020

Copy link
Copy Markdown
Member

I think the ON_CI definition is correct, so somehow iers.LeapSeconds.open(SYSTEM_FILE).expires < self.good_enough does not apply?

@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

Yes, I think the test I do is not exactly the same as what is used in the real code... Will push a correction shortly...

@mhvk
mhvk force-pushed the fix-leapsecond-system-file-test branch 2 times, most recently from 9c079ec to 08cf61c Compare January 30, 2020 17:41
@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

Turns out our built-in leap-second file was expired, which was the real underlying source of the errors. I now updated that as well, and added a test that will make it clearer if that is the real problem.

Comment thread astropy/utils/iers/data/Leap_Second.dat
ls = iers.LeapSeconds.open()
assert ls.meta['data_url'] == iers.IERS_LEAP_SECOND_FILE
# The built-in file should be kept up to date.
# TODO: would be nice to have automatic PRs for this!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this request the same as the one at #1697 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, but now every half year we'll get a reminder... (more seriously, will add this to #1697)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

and I see that issue ends with me promising to open a PR to the release procedure... 🤦‍♂️

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

release procedure

Not sure how I feel about it being part of the release procedure. However it certainly can be a "last before release" type of reminder, similarly to the bundled libraries. See #9018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

maybe we can make this a cron only test (or simply just flag with remote_data thus allowed to fail on PRs), so as not to introduce false positives while the update PR is not merged?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 to remote_data with a comment to explain why. But it will have to be a follow-up PR.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

OK, I'll make a quick PR that marks this remote_data - agreed that we don't really want to have regular PRs start failing with it!

@pllim

pllim commented Jan 30, 2020

Copy link
Copy Markdown
Member

mpldev failure is unrelated.

@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

@pllim, @bsipocz - if all tests pass here, I plan to go ahead and merge so that we get rid of the CI failures (and my upcoming release doc PR will not break!).

@mhvk
mhvk force-pushed the fix-leapsecond-system-file-test branch from 08cf61c to 3769006 Compare January 30, 2020 18:57
@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

Grr, small error still....

@mhvk
mhvk merged commit 1fa570a into astropy:master Jan 30, 2020
@mhvk
mhvk deleted the fix-leapsecond-system-file-test branch January 30, 2020 19:41
@pllim

pllim commented Jan 30, 2020

Copy link
Copy Markdown
Member

Just to be sure, are any of the numpy-dev job failures related to this?

https://travis-ci.org/astropy/astropy/jobs/644009511

@mhvk

mhvk commented Jan 30, 2020

Copy link
Copy Markdown
Contributor Author

One of those is numpy-dev, I think (the time one); others seem related to jplephem, with one a download error and the other a precision problem not captured by FLOAT_CMP which I've seen before (and am now fed up with!).

bsipocz pushed a commit that referenced this pull request Feb 5, 2020
Ensure we do not fail when CI leap second file is expired.
@mhvk mhvk mentioned this pull request Apr 8, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants