-
Notifications
You must be signed in to change notification settings - Fork 53
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
feat: Create a verifier as a service #182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm to keep iterating on
Tag *string `json:"tag"` | ||
Branch *string `json:"branch"` | ||
VersionedTag *string `json:"versionedTag"` | ||
PrintProvenance *bool `json:"printProvenance"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this matches the CLI options, but do you think the API needs to return provenance at all? this is a service that will be used to just get a pass/fail option. unless maybe someone wants to pipe in the result to other services to do more analysis on the provenance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, someone may want to check for repository-id and what not. It's an optional argument, so is not needed. Is that OK?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will iterate, so I'm going to merge. This PR is just to get the ball rolling with something to hack on.
Signed-off-by: Asra Ali <[email protected]>
See #163
This PR was originally started in #164 . There was a large file accidentally pushed in one of the commits. After removing it, the PR got automatically closed. Hence this new PR.
This is an experimental feature, obviously. This PR does:
/v1/verify
which takes as input the same as the CLI (except for the artifact which is replaced by its hash):Example:
curl -s 127.0.0.1:8000/v1/verify -d @./request
and returns:
We may want to change some of the names. I have not included unit tests yet. Will do in a follow-up PR. (need to mock the http client).
Let me know what you think about the input / output format. I'm wondering if we should unify the output for both the cli and the service. It would force us to have proper error / log handling