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

Pin version of gojsonschema in tests #1682

Merged
merged 1 commit into from
Jan 11, 2018
Merged

Pin version of gojsonschema in tests #1682

merged 1 commit into from
Jan 11, 2018

Conversation

BooleanCat
Copy link

@BooleanCat BooleanCat commented Jan 4, 2018

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

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
Copy link
Contributor

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.

Copy link
Author

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

Copy link
Contributor

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:

  1. An alternative version of gojsonschema may be in use that could fix this. We can never test with this.
  2. A GOPATH may consist of multiple paths.

Just because the same pattern is in use doesn't mean that it is correct.

@hqhq
Copy link
Contributor

hqhq commented Jan 9, 2018

LGTM

Approved with PullApprove

@hqhq hqhq mentioned this pull request Jan 9, 2018
@runcom
Copy link
Member

runcom commented Jan 11, 2018

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

@crosbymichael
Copy link
Member

crosbymichael commented Jan 11, 2018

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 )

Approved with PullApprove

@crosbymichael crosbymichael merged commit 0aa69f2 into opencontainers:master Jan 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test failing on master
5 participants