Skip to content

Switch jsonschema validation libraries#1189

Merged
sajayantony merged 1 commit intoopencontainers:mainfrom
sudo-bmitch:pr-jsonschema-validator
Jun 18, 2024
Merged

Switch jsonschema validation libraries#1189
sajayantony merged 1 commit intoopencontainers:mainfrom
sudo-bmitch:pr-jsonschema-validator

Conversation

@sudo-bmitch
Copy link
Copy Markdown
Contributor

This swaps out https://github.com/xeipuuv/gojsonschema for https://github.com/santhosh-tekuri/jsonschema. Considering how far back some of this code goes, feedback from @stevvooe and @vbatts would be awesome.

Signed-off-by: Brandon Mitchell <git@bmitch.net>
@sudo-bmitch sudo-bmitch force-pushed the pr-jsonschema-validator branch from 085bebd to 4bbdd7f Compare May 26, 2024 21:33
Comment thread schema/validator.go
@rchincha
Copy link
Copy Markdown
Contributor

I would also keep a fork of this dep under OCI repos because the author may:

  1. delete the repo or change access
  2. change license
  3. some other apocalyptic event ...

@sudo-bmitch
Copy link
Copy Markdown
Contributor Author

I would also keep a fork of this dep under OCI repos because the author may:

1. delete the repo or change access

2. change license

3. some other apocalyptic event ...

I think most of those concerns are covered by individual developers with the go module cache on their machines, in addition to Google's Go proxy server: https://sum.golang.org/.

@sajayantony sajayantony merged commit 036563a into opencontainers:main Jun 18, 2024
@sudo-bmitch sudo-bmitch deleted the pr-jsonschema-validator branch June 18, 2024 17:36
@sudo-bmitch sudo-bmitch mentioned this pull request Feb 24, 2025
6 tasks
@thaJeztah
Copy link
Copy Markdown
Member

I think most of those concerns are covered by individual developers with the go module cache on their machines, in addition to Google's Go proxy server: https://sum.golang.org/.

just a quick comment that Google's Go proxy server is NOT a safeguard against such events; it's a caching proxy, but cache expires after 6 Months. Consider it a protection against repository going AWOL with a grace-period.

FWIW, we have had situations where that happened; at least in one case the upstream (one of Microsoft's repositories) decided to "start a new implementation from scratch" and to force-push the repository with new code. Another case was where the upstream repository went AWOL (or vanity domain expired), which was discovered early by us because we used GOPROXY=direct for our vendor check, but for some other repositories didn't show up until Google's Go proxy expired after 6 Months.

From Google's proxy server; https://proxy.golang.org/#faq-retention

Why did a previously available module become unavailable in the mirror?

proxy.golang.org does not save all modules forever. There are a number of reasons for this, but one reason is if proxy.golang.org is not able to detect a suitable license. In this case, only a temporarily cached copy of the module will be made available, and may become unavailable if it is removed from the original source and becomes outdated. The checksums will still remain in the checksum database regardless of whether or not they have become unavailable in the mirror.

So while https://sum.golang.org/ may keep the checksum, it may still be relevant to have a fork of the code to be able to add a replace rule (or otherwise).

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.

6 participants