GeezerVison is showing github.com — Allow configuring CODEQL_THREADS with an env var by austinpray-mixpanel · Pull Request #2891 · github/codeql-action
Conversation
closes #2890
Merge / deployment checklist
- Confirm this change is backwards compatible with existing workflows.
- Confirm the readme has been updated if necessary.
- Confirm the changelog has been updated if necessary.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Pull Request Overview
This PR enables configuring the number of CodeQL threads via an environment variable.
- Allows users to override the thread count using CODEQL_THREADS in the environment.
- Falls back to computing the thread value based on the "threads" input if the env var is not set.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
Thanks for your PR. I don't think this is harmful or could break anything, but it seems a bit redundant.
Can you try this alternate approach?
In the init/actions.yml file add default: "${{ env.CODEQL_THREADS }}" to the threads input. This should be sufficient.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Thanks for your PR. I don't think this is harmful or could break anything, but it seems a bit redundant.
Can you try this alternate approach?
In the init/actions.yml file add default: "${{ env.CODEQL_THREADS }}" to the threads input. This should be sufficient.
Yep I can give this a shot. My initial change was just trying to match up the way the ram variable was treated
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Yep I can give this a shot. My initial change was just trying to match up the way the ram variable was treated
Great. Let me know if this works for you. Now that I'm engaged, I'll be able to respond more quickly to this PR.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@aeisenberg ah I don't think you can use env variable expressions in inputs
Error: /Users/runner/work/codeql-action/codeql-action/./../action/init/action.yml (Line: 118, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.CODEQL_THREADS
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Oh...that's really unfortunate. Apologies for the confusion. I'm asking internally what's going on since this is a pattern that's being used elsewhere.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Oh...that's really unfortunate. Apologies for the confusion. I'm asking internally what's going on since this is a pattern that's being used elsewhere.
Most of those examples commented out the default field with a # though. I'm not sure why the env context is not allowed, perhaps it is not available until a workflow starts to "run".
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
In any case it probably makes sense to have the threads and ram behavior configuration be exactly the same so there aren't any surprises

|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|