GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow configuring CODEQL_THREADS with an env var by austinpray-mixpanel · Pull Request #2891 · github/codeql-action

Conversation

@austinpray-mixpanel

@austinpray-mixpanel austinpray-mixpanel commented May 6, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@austinpray-mixpanel
Allow configuring CODEQL_THREADS with an env var
c41b278
ref github#2890
Copilot AI review requested due to automatic review settings May 6, 2025 02:29
@austinpray-mixpanel
austinpray-mixpanel requested a review from a team as a code owner May 6, 2025 02:29
@austinpray-mixpanel austinpray-mixpanel mentioned this pull request May 6, 2025
No way to configure CODEQL_THREADS with an environment variable #2890
Closed
Copilot AI reviewed May 6, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread src/init-action.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

aeisenberg
aeisenberg reviewed May 13, 2025
View reviewed changes

@aeisenberg aeisenberg left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
@austinpray-mixpanel

austinpray-mixpanel commented May 13, 2025

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aeisenberg

aeisenberg commented May 13, 2025

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@austinpray-mixpanel
threads defaults to CODEQL_THREADS env var
df7d681
@austinpray-mixpanel

austinpray-mixpanel commented May 13, 2025

Copy link
Copy Markdown
Contributor Author

@aeisenberg lmk what you think 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

aeisenberg
aeisenberg previously approved these changes May 13, 2025
View reviewed changes

@aeisenberg aeisenberg left a comment

Copy link
Copy Markdown
Contributor

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 looks right to me.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@austinpray-mixpanel

austinpray-mixpanel commented May 13, 2025

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@austinpray-mixpanel
Revert "threads defaults to CODEQL_THREADS env var"
77ae18d
This reverts commit df7d681.
@austinpray-mixpanel
austinpray-mixpanel dismissed aeisenberg’s stale review via 77ae18d May 13, 2025 22:19
@aeisenberg

aeisenberg commented May 13, 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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@austinpray-mixpanel

austinpray-mixpanel commented May 14, 2025

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
image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

henrymercer commented 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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

austinpray-mixpanel added 2 commits May 14, 2025 15:41
@austinpray-mixpanel
rebuild
3dce55a
@austinpray-mixpanel
Update CHANGELOG.md
bb9fc01
@austinpray-mixpanel

austinpray-mixpanel commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

@henrymercer done 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@henrymercer henrymercer removed the Rebuild Re-transpile JS & re-generate workflows label May 14, 2025
henrymercer
henrymercer approved these changes May 14, 2025
View reviewed changes
aeisenberg
aeisenberg approved these changes May 14, 2025
View reviewed changes
@aeisenberg
aeisenberg merged commit cffc916 into github:main May 14, 2025
@austinpray-mixpanel

austinpray-mixpanel commented May 14, 2025

Copy link
Copy Markdown
Contributor Author

Thank you all!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 16, 2025
Merge main into releases/v3 #2896
Merged
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@aeisenberg aeisenberg aeisenberg approved these changes
@henrymercer henrymercer henrymercer approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

No way to configure CODEQL_THREADS with an environment variable

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@austinpray-mixpanel @aeisenberg @aibaars @henrymercer
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.