-
Notifications
You must be signed in to change notification settings - Fork 335
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
Cleanup CodeQL DBs and output their location for later steps #543
Cleanup CodeQL DBs and output their location for later steps #543
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.
Looks good. A couple of suggestions around comments.
analyze/action.yml
Outdated
@@ -13,6 +13,10 @@ inputs: | |||
description: Upload the SARIF file | |||
required: false | |||
default: "true" | |||
cleanup-level: | |||
description: "Level of cleanup to perform on CodeQL databases at the end of the analyze step. This should either be 'none' to skip cleanup, or be a valid argument for the --mode flag of the CodeQL CLI command 'codeql database cleanup'" |
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.
Would be nice if you could list the valid options here. Or maybe provide a link to the documentation (or both).
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'm hesitant to list the options because it duplicates where we have to make a documentation change if we modify them later. Have added a link to the CLI docs, though.
4ca6678
to
bcb4f48
Compare
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.
👍🏼
bcb4f48
to
ec666f8
Compare
This PR does two things that should facilitate user workflows that want to upload CodeQL databases somewhere:
analyze
step are cleaned up at the end of the step (i.e. items that are not needed to run further queries like evaluation logs and the cache are removed). The level of cleanup performed is configurable via a new parameter of theanalyze
step. I don't think we should expose this in user-facing documentation as most users will just want the default, but it may be useful for internal debugging to have an option there.analyze
step now has an output,db-locations
that contains a JSON object mapping from languages that a CodeQL database was created for to the location of this database on disk. I've modified one of the PR checks to use this to verify that it is populated correctly.Merge / deployment checklist