.travis.yml: Rebuild schema-fs in the Travis tests#530
Closed
wking wants to merge 4 commits intoopencontainers:masterfrom
Closed
.travis.yml: Rebuild schema-fs in the Travis tests#530wking wants to merge 4 commits intoopencontainers:masterfrom
wking wants to merge 4 commits intoopencontainers:masterfrom
Conversation
8154b26 to
f544320
Compare
This was referenced Jan 26, 2017
dfa0afb to
0998d27
Compare
Contributor
Author
|
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. |
Contributor
|
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
Contributor
Author
Contributor
Author
|
Hmm, looks like there's some unstable compression. I wonder if we can turn that off… |
Member
|
I just fixed this in #533 in a nicer way that doesn't require travis. |
Contributor
Contributor
Contributor
Author
|
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.
|
Member
|
@wking https://github.com/opencontainers/image-spec/pull/533/files#diff-b67911656ef5d18c4ae36cb6741b7965R79 sorry. I should've included a link. By running |
Contributor
Author
|
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)
|
This was referenced Jan 28, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.