Skip to content

Add FF to force JGit-based Git backend#3938

Open
henrymercer wants to merge 1 commit into
mainfrom
henrymercer/git-client-feature-flag
Open

Add FF to force JGit-based Git backend#3938
henrymercer wants to merge 1 commit into
mainfrom
henrymercer/git-client-feature-flag

Conversation

@henrymercer
Copy link
Copy Markdown
Contributor

Add a feature flag to force Git client selection to use the JGit Git backend. This is an emergency override in case of problems with the git CLI based backend.

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, Code Quality, ...).

Products:

  • Code Scanning - The changes impact analyses when analysis-kinds: code-scanning.
  • Code Quality - The changes impact analyses when analysis-kinds: code-quality.
  • Other first-party - The changes impact other first-party analyses.
  • Third-party analyses - The changes affect the upload-sarif action.

Environments:

  • Dotcom - Impacts CodeQL workflows on github.com and/or GitHub Enterprise Cloud with Data Residency.
  • GHES - Impacts CodeQL workflows on GitHub Enterprise Server.

How did/will you validate this change?

  • None - I am not validating these changes.

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

  • Feature flags - All new or changed code paths can be fully disabled with corresponding feature flags.

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.
    • Alerts - New or existing monitors will trip if something goes wrong with this change.

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.

Copilot AI review requested due to automatic review settings June 1, 2026 14:22
@henrymercer henrymercer requested a review from a team as a code owner June 1, 2026 14:22
@github-actions github-actions Bot added the size/XS Should be very easy to review label Jun 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 introduces a new feature flag that allows the action to force the CodeQL CLI to use the JGit-based Git backend, providing an emergency override if the git CLI-based backend causes issues.

Changes:

  • Add Feature.ForceJGit (force_jgit) with env-var override CODEQL_ACTION_FORCE_JGIT.
  • When the flag is enabled, export CODEQL_GIT_BACKEND=jgit during init so subsequent CodeQL CLI invocations use JGit.
  • Update the generated lib/entry-points.js to reflect the TypeScript changes.
Show a summary per file
File Description
src/init-action.ts Exports CODEQL_GIT_BACKEND=jgit when the new feature flag is enabled.
src/feature-flags.ts Defines the new ForceJGit feature flag and its configuration/env var override.
lib/entry-points.js Generated output updated to match the TypeScript source changes.

Copilot's findings

  • Files reviewed: 2/3 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants