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 — Determine CodeQL version from feature flags on GHEC-DR by henrymercer · Pull Request #3351 · github/codeql-action

Conversation

@henrymercer

@henrymercer henrymercer commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

This lets us roll back a bad version of CodeQL more quickly in GitHub Enterprise Cloud with data residency.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Workflow types:

  • Advanced setup - Impacts users who have custom CodeQL workflows.
  • Managed - Impacts users with dynamic workflows (Default Setup, CCR, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.
  • Code Quality - The changes impact analyses when analysis-kinds: code-quality.

Environments:

  • GHEC-DR

How did/will you validate this change?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

  • Telemetry - I rely on existing telemetry or have made changes to the telemetry.
    • Dashboards - I will watch relevant dashboards for issues after the release. Consider whether this requires this change to be released at a particular time rather than as part of a regular release.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

Sorry, something went wrong.

Uh oh!

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

All reactions
henrymercer added 3 commits December 10, 2025 17:35
@henrymercer
Determine CodeQL version from feature flags on GHEC-DR
7a55ffe
@henrymercer
Rename GHE_DOTCOM to GHEC_DR
1fc7d37
This more closely reflects the published naming https://docs.github.com/en/enterprise-cloud@latest/admin/data-residency/about-github-enterprise-cloud-with-data-residency
@henrymercer
Update PR template to include GHEC-DR
da50124
@henrymercer
henrymercer requested a review from a team as a code owner December 10, 2025 17:42
Copilot AI review requested due to automatic review settings December 10, 2025 17:42
Copilot started reviewing on behalf of henrymercer December 10, 2025 17:42
View session
@github-actions github-actions Bot added the size/M Should be of average difficulty to review label Dec 10, 2025
Copilot AI reviewed Dec 10, 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 renames the GitHub variant GHE_DOTCOM to GHEC_DR (GitHub Enterprise Cloud with Data Residency) and enables feature flag support for determining the CodeQL version on GHEC-DR environments. This allows faster rollback of bad CodeQL versions in GHEC-DR by using feature flags, similar to how it works for GitHub.com.

Key Changes

  • Renamed GHE_DOTCOM enum variant to GHEC_DR with string values for better clarity
  • Enabled feature flag support for GHEC-DR to determine CodeQL CLI versions
  • Updated CodeQL source selection logic to be more precise (checking for GHES specifically instead of "not DOTCOM")

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/util.ts Renamed enum variant from GHE_DOTCOM to GHEC_DR and changed enum values from numeric to string literals
src/util.test.ts Updated test cases to use renamed GHEC_DR variant
src/setup-codeql.ts Fixed logic to check for GHES specifically instead of "not DOTCOM", enabling GHEC-DR to use default tooling
src/feature-flags.ts Added supportsFeatureFlags helper function that includes both DOTCOM and GHEC-DR, enabling feature flags for GHEC-DR
src/feature-flags.test.ts Renamed test from "Proxima" to "GHEC-DR" and parameterized tests to cover both DOTCOM and GHEC-DR variants
src/database-upload.ts Updated variant check to use renamed GHEC_DR constant
src/api-client.ts Updated return value to use GHEC_DR when detecting "ghe.com" header
src/api-client.test.ts Updated test to use GHEC_DR variant name
.github/pull_request_template.md Updated documentation to clarify that "Dotcom" environment includes GHEC-DR
lib/**/*.js Auto-generated JavaScript files reflecting TypeScript changes (not reviewed per guidelines)

Sorry, something went wrong.

Uh oh!

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

All reactions
mbg
mbg previously approved these changes Dec 16, 2025
View reviewed changes

@mbg mbg left a comment

Copy link
Copy Markdown
Member

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.

Changes look good and make sense to me! I added a couple of very minor style suggestions, but feel free to ignore those.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/util.ts Outdated
GHE_DOTCOM,
DOTCOM = "GitHub.com",
GHES = "GHES",
GHEC_DR = "GHEC-DR",

@mbg mbg Dec 16, 2025

Copy link
Copy Markdown
Member

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.

Minor: Should the string value be spelled out as e.g. GHEC (with Data Residency) or similar?

Sorry, something went wrong.

Uh oh!

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

All reactions

@henrymercer henrymercer Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

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've expanded this.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread src/util.test.ts
Comment on lines 433 to 440
switch (version.type) {
case util.GitHubVariant.DOTCOM:
return "dotcom";
case util.GitHubVariant.GHE_DOTCOM:
return "GHE dotcom";
case util.GitHubVariant.GHEC_DR:
return "GHEC-DR";
case util.GitHubVariant.GHES:
return `GHES ${version.version}`;
default:

@mbg mbg Dec 16, 2025

Copy link
Copy Markdown
Member

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.

Minor: How about something like this now that GitHubVariant has string values associated with the elements?

Suggested change
switch (version.type) {
case util.GitHubVariant.DOTCOM:
return "dotcom";
case util.GitHubVariant.GHE_DOTCOM:
return "GHE dotcom";
case util.GitHubVariant.GHEC_DR:
return "GHEC-DR";
case util.GitHubVariant.GHES:
return `GHES ${version.version}`;
default:
switch (version.type) {
case util.GitHubVariant.DOTCOM:
case util.GitHubVariant.GHEC_DR:
return `${version.type}`;
case util.GitHubVariant.GHES:
return `GHES ${version.version}`;
default:

Sorry, something went wrong.

Uh oh!

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

All reactions

@henrymercer henrymercer Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

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.

Now that we're using the full names above, I think it's preferable to keep the abbreviated names here to keep test titles concise.

Sorry, something went wrong.

Uh oh!

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

All reactions
@henrymercer
Use full names for GitHub variants
a2ee53c
@henrymercer
henrymercer dismissed mbg’s stale review via a2ee53c December 16, 2025 13:23
@henrymercer
henrymercer requested a review from mbg December 16, 2025 13:24
mbg
mbg approved these changes Dec 16, 2025
View reviewed changes
@henrymercer
henrymercer enabled auto-merge December 16, 2025 13:28
@henrymercer
henrymercer merged commit c07cc0d into main Dec 16, 2025
@henrymercer
henrymercer deleted the henrymercer/ghec-dr-determine-tools-version-from-ffs branch December 16, 2025 13:42
This was referenced Dec 16, 2025
Merge main into releases/v4 #3371
Merged
Merge releases/v4 into releases/v3 #3373
Merged
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
@mbg mbg mbg approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

size/M Should be of average difficulty to review

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

3 participants

@henrymercer @mbg
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.