Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # 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
@lifubang lifubang deleted the upgrade-spec.bat branch October 15, 2024 05:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants