FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow configuring CODEQL_THREADS with an env var by austinpray-mixpanel · Pull Request #2891 · github/codeql-action · GitHub

Allow configuring CODEQL_THREADS with an env var - #2891

Merged
aeisenberg merged 5 commits into
github:mainfrom
austinpray-mixpanel:patch-1
May 14, 2025
Merged

aeisenberg merged 5 commits into
github:mainfrom
austinpray-mixpanel:patch-1

Conversation

austinpray-mixpanel commented May 6, 2025
edited
Loading

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings May 6, 2025 02:29
austinpray-mixpanel requested a review from a team as a code owner May 6, 2025 02:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Comment thread src/init-action.ts

aeisenberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor Author

@aeisenberg lmk what you think 👍

aeisenberg previously approved these changes May 13, 2025

aeisenberg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks right to me.

Copy link
Copy Markdown
Contributor Author

@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

Copy link
Copy Markdown
Contributor

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.

aeisenberg added Rebuild Re-transpile JS & re-generate workflows and removed Rebuild Re-transpile JS & re-generate workflows labels May 14, 2025

aibaars commented May 14, 2025

Copy link
Copy Markdown
Contributor

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".

Copy link
Copy Markdown
Contributor Author

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

henrymercer added Rebuild Re-transpile JS & re-generate workflows and removed Rebuild Re-transpile JS & re-generate workflows labels May 14, 2025

Copy link
Copy Markdown
Contributor

Thanks for the contribution @austinpray-mixpanel! Could you follow the instructions in https://github.com/github/codeql-action/blob/main/CONTRIBUTING.md#common-tasks to rebuild the project?

Copy link
Copy Markdown
Contributor Author

@henrymercer done 👍

henrymercer removed the Rebuild Re-transpile JS & re-generate workflows label May 14, 2025
aeisenberg merged commit cffc916 into github:main May 14, 2025

Copy link
Copy Markdown
Contributor Author

Thank you all!

github-actions Bot mentioned this pull request May 16, 2025
8 tasks
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to configure CODEQL_THREADS with an environment variable

5 participants


Back | FazBrowse Home | New Git URL