-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add processor to workspace state #730
Conversation
Signed-off-by: Alex Goodman <[email protected]>
@@ -1,6 +1,6 @@ | |||
# the default is to run these on commit + push | |||
default_stages: | |||
- push | |||
- pre-push |
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 was getting strong deprecation warnings from the pre-commit tooling on this (and there was an auto migration command, which was rather nice of them to have)
"processor": { | ||
"type": "string", | ||
"description": "the application that created the workspace, formatted as 'name@version'" | ||
}, |
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.
This is what was added relative to the last schema
try: | ||
from importlib import metadata | ||
except ImportError: | ||
# Python < 3.8 | ||
import importlib_metadata as metadata | ||
|
||
try: | ||
if not metadata: | ||
raise metadata.PackageNotFoundError | ||
version = metadata.version(package_name) |
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.
this is how you can reflect package version information rather than use hard coded strings
This adds vunnel version information to workspace output, so we know which version of vunnel did the processing of the upstream data. This is related to grype DB v6 work so that we have more detail on a provider-level on how the data was handled upstream.