feat: use go types generated by cue exp gengotypes#21
Closed
feat: use go types generated by cue exp gengotypes#21
cue exp gengotypes#21Conversation
This PR adds additional test coverage to the Read func and verifies that the presence of `header.project-si-source` results in the correct SI data overrides Signed-off-by: Travis Truman <trumant@gmail.com>
This PR updates the v2 go source to use the results of running `cue exp gengotypes` against the canonical schema in ossf/security-insights-spec Additional supporting changes added in this PR are: - Makefile for common CI/contributor tasks - replace gopkg.in/yaml.v3 with github.com/goccy/go-yaml - CI workflows to run the tests The generated code here is based on the changes in ossf/security-insights#125 Signed-off-by: Travis Truman <trumant@gmail.com>
eddie-knight
reviewed
May 6, 2025
|
|
||
| package si | ||
|
|
||
| type URL string |
Contributor
There was a problem hiding this comment.
This is a breaking change, somewhat unexpectedly...
Logs from running pvtr-github-repo with a replace to my local copy of this branch
evaluation_plans/osps/build_release/steps.go:180:3: cannot use si.Header.URL (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:181:3: cannot use si.Header.ProjectSISource (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:182:3: cannot use si.Project.Homepage (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:183:3: cannot use si.Project.Roadmap (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:184:3: cannot use si.Project.Funding (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:185:3: cannot use si.Project.Documentation.DetailedGuide (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:186:3: cannot use si.Project.Documentation.CodeOfConduct (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:187:3: cannot use si.Project.Documentation.QuickstartGuide (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:188:3: cannot use si.Project.Documentation.ReleaseProcess (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:189:3: cannot use si.Project.Documentation.SignatureVerification (variable of string type si.URL) as string value in array or slice literal
evaluation_plans/osps/build_release/steps.go:189:3: too many errorsI haven't yet investigated what needs done when importing the SI library after this change.
Contributor
Author
There was a problem hiding this comment.
Hmm - let me dig in there. Thanks for your review.
Contributor
Author
|
Closing in favor of #26 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the v2 go source to use the results
of running
cue exp gengotypesagainst the canonicalschema in ossf/security-insights-spec
Additional supporting changes added in this PR are:
The generated code here is based on the changes in ossf/security-insights#125