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

Bump gojsonschema #733

Merged
merged 2 commits into from
Oct 25, 2021
Merged

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Oct 20, 2021

  1. validate: fix tests for new xeipuuv/gojsonschema

    New(er) xeipuuv/gojsonschema package is trying to fetch id fields,
    which in the spec were looking like this:

         "id": "https://opencontainers.org/schema/bundle/linux"
    

    Obviously, this results in HTTP 404s, and multiple test failures.

    This was fixed by schema: Completely drop our JSON Schema 'id' properties runtime-spec#945
    which ended up in runtime-spec v1.0.2.

    ⚠️ This essentially means with newer xeipuuv/gojsonschema we are no longer
    able to validate against runtime-spec < 1.0.2.

    To adopt for a new xeipuuv/gojsonschema, do the following:

    1. Add the version check, add a test case for it.

    2. Remove some test cases:

    3. Bump the spec version in all test cases.

    4. Fix "invalid seccomp action" error as it now also has SCMP_ACT_LOG.

  2. deps: bump github.com/xeipuuv/gojsonschema to v1.2.0

    Brought to you by

         go get github.com/xeipuuv/gojsonschema@latest
         go mod vendor
         go mod tidy
    

New(er) xeipuuv/gojsonschema package is trying to fetch id fields,
which in the spec were looking like this:

	"id": "https://opencontainers.org/schema/bundle/linux"

Obviously, this results in HTTP 404s, and multiple test failures.

This was fixed by opencontainers/runtime-spec#945
which ended up in runtime-spec v1.0.2.

This essentially means with newer xeipuuv/gojsonschema we are no longer
able to validate against runtime-spec < 1.0.2.

To adopt for a new xeipuuv/gojsonschema, do the following:

1. Add the version check, add a test case for it.

2. Remove some test cases:

   - "process is required" as it needed v1.0.0-rc5 version of spec.
   - "args is required" as args are no longer required since commit
      opencontainers/runtime-spec@deb4d954eafc4fc.

3. Bump the spec version in all test cases.

4. Fix "invalid seccomp action" error as it now also has SCMP_ACT_LOG.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Brought to you by

	go get github.com/xeipuuv/gojsonschema@latest
	go mod vendor
	go mod tidy

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This was referenced Oct 20, 2021
@rhatdan
Copy link
Contributor

rhatdan commented Oct 25, 2021

LGTM
@mrunalp @vbatts @crosbymichael @dqminh PTAL

@tianon tianon merged commit 92232ab into opencontainers:master Oct 25, 2021
@cyphar cyphar mentioned this pull request Sep 15, 2023
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.

3 participants