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

[ci] use go mod instead of go get in spec.bats #4264

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

lifubang
Copy link
Member

When we run integration test in go 1.22, it got an error:

 ✗ spec validator
   (in test file tests/integration/spec.bats, line 37)
     `GO111MODULE=auto go get github.com/xeipuuv/gojsonschema' failed
   runc spec (status=0):
   
   Cloning into 'runtime-spec'...
   HEAD is now at 36852b0 version: release v1.2.0
   go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

Although we have not supported go 1.22 yet, but I think we should update the spec.bat first.

@lifubang lifubang mentioned this pull request Apr 29, 2024
Comment on lines 42 to 43
cd ../../
./runtime-spec/schema/validate "$SCHEMA" config.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe easier to do

./validate config-schema.json ../../config.json

(and remove cd and SCHEMA= above)

Long term, I guess, we need to fix runtime-spec to

  • embed config-schema.json into validate binary
  • add go.mod to runtime-spec
  • make it easier to use so go install github.com/opencontainers/runtime-spec/schema/validate@$SPEC_REF results in validate binary ready to be used.

Copy link
Contributor

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: lifubang <lifubang@acmcoder.com>
@AkihiroSuda AkihiroSuda merged commit 7a017af into opencontainers:main Apr 30, 2024
40 checks passed
@lifubang lifubang mentioned this pull request Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants