-
Notifications
You must be signed in to change notification settings - Fork 652
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
.travis.yml: Rebuild schema-fs in the Travis tests #530
Conversation
8154b26
to
f544320
Compare
dfa0afb
to
0998d27
Compare
Ok, I think 2d54423 has everything we need. The tests are still failing, but that's catching the breakage from #411 which is addressed in #531. Once #531 lands, I'll rebase this PR on top. |
Ready for rebase |
So we can 'make schema-fs' in Travis. Signed-off-by: W. Trevor King <wking@tremily.us>
And error out if that fails. 'make schema-fs' is in before_install, since things are really broken in that case and we want to error the build exit immediately [1]. If someone forgot to run schema-fs, that's less serious and we only want to fail the build (and still run the other tests) [1]. [1]: https://docs.travis-ci.com/user/customizing-the-build/#Breaking-the-Build Signed-off-by: W. Trevor King <wking@tremily.us>
To give reproducible builds regardless of when you check the JSON files out of Git. Signed-off-by: W. Trevor King <wking@tremily.us>
To zero out the modtimes (picking up the change from the previous commit). Generated with: $ make schema-fs Signed-off-by: W. Trevor King <wking@tremily.us>
2d54423
to
4112ba1
Compare
Hmm, looks like there's some unstable compression. I wonder if we can turn that off… |
I just fixed this in #533 in a nicer way that doesn't require travis. |
On Fri, Jan 27, 2017 at 12:39:26PM -0800, Vincent Batts wrote:
I just fixed this in #533 in a nicer way that doesn't require
travis.
|
@wking https://github.com/opencontainers/image-spec/pull/533/files#diff-b67911656ef5d18c4ae36cb6741b7965R79 sorry. I should've included a link. By running |
On Fri, Jan 27, 2017 at 12:51:31PM -0800, Vincent Batts wrote:
@wking
https://github.com/opencontainers/image-spec/pull/533/files#diff-b67911656ef5d18c4ae36cb6741b7965R79
sorry. I should've included a link.
By running `make validate-examples` whether local or on travis, it
will ensure they're fresh.
But the copy in version control could be stale (as it was in the wake
of #411). Presumably, fs.go is only in version control to save some
network access for folks using schema/ as a library. Those folks will
probably not be running ‘make schema-fs’ on their vendored package, so
we need a plan to keep them working. This PR (once we figured out the
unstable compression [1]) would have ensured fs.go was always current
in version control.
An alternative would be to take your approach from #533 (ignoring the
version-controlled fs.go in CI), but we'd have to remember to re-build
and commit schema-fs for each release.
A third option would be to drop http.FileSystem and hit the network
for the JSON Schema files when validating (or to work out an
alternative method to cache these locally). More on this in #150,
which I still think needs to be re-opened in image-spec (although the
current position there is to allow both http.FileSystem and network
access, and with that we'd still need to keep fs.go up to date).
[1]: #530 (comment)
|
And error out if that fails. This would have caught a bug where #444 passes but 111a99d (which merged #444) fails after a schema-fs rebuild.