-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Pin version of gojsonschema in tests #1682
Conversation
Signed-off-by: Will Martin <wmartin@pivotal.io>
@@ -81,6 +81,9 @@ function teardown() { | |||
run bash -c "GOPATH='$GOPATH' go get github.com/xeipuuv/gojsonschema" | |||
[ "$status" -eq 0 ] | |||
|
|||
run git -C "${GOPATH}/src/github.com/xeipuuv/gojsonschema" reset --hard 6637feb73ee44cd4640bb3def285c29774234c7f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit tests should not modify local environments like this. This will lose local changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But gojsonschema isn't the thing under test, it's a dependency. The same pattern is already used to pin runtime-spec: https://github.com/opencontainers/runc/blob/master/tests/integration/spec.bats#L76
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line makes two basically incorrect assumptions that will break:
- An alternative version of gojsonschema may be in use that could fix this. We can never test with this.
- A
GOPATH
may consist of multiple paths.
Just because the same pattern is in use doesn't mean that it is correct.
Can we merge as a temporary stopgap to unblock other PRs? Many other repo added a workaround like this for now, we can create an issue to revert and fully fix this once we know what to do. @mrunalp ptal |
LGTM A fix after this should be moving these out of the bats files. It makes no sense that deps are scattered and hidden in various files. ( @BooleanCat not your fault, its good that you kept it consistent for now ) |
Fixes #1680 (partially). This is suggested as a temporary fix to runc so that CI can go green and development can continue.
We will detail a potential problem we've found with opencontainers json schema validation in a email to the mailing list.
Signed-off-by: Will Martin wmartin@pivotal.io