Skip to content

Make FFs available in start-proxy action#3438

Open
mbg wants to merge 1 commit intomainfrom
mbg/start-proxy/ffs
Open

Make FFs available in start-proxy action#3438
mbg wants to merge 1 commit intomainfrom
mbg/start-proxy/ffs

Conversation

@mbg
Copy link
Member

@mbg mbg commented Jan 28, 2026

(Based on #3464 which should be merged first.)

This PR makes a Features object available in the start-proxy action. While we don't make any use of this yet, we plan to in later changes.

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:

  • 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:

  • 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?

  • Unit tests - I am depending on unit test coverage (i.e. tests in .test.ts files).
  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

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

@github-actions github-actions bot added the size/S Should be easy to review label Jan 28, 2026
@mbg mbg force-pushed the mbg/start-proxy/ffs branch from 3524024 to d2901f5 Compare February 6, 2026 10:43
@mbg mbg changed the base branch from mbg/track-ff-usage to mbg/disable-ts-unused-checks February 6, 2026 10:44
@github-actions github-actions bot added size/XS Should be very easy to review and removed size/S Should be easy to review labels Feb 6, 2026
Base automatically changed from mbg/disable-ts-unused-checks to main February 6, 2026 10:59
@mbg mbg marked this pull request as ready for review February 6, 2026 11:00
@mbg mbg requested a review from a team as a code owner February 6, 2026 11:00
Copilot AI review requested due to automatic review settings February 6, 2026 11:00
Copy link
Contributor

@henrymercer henrymercer left a comment

Choose a reason for hiding this comment

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

In general, I'd prefer to avoid adding operations that take time and are unused, but in this case we're very likely to use the feature flags in another Action, meaning we'd need to make the API call anyway. So LGTM.

Comment on lines +114 to +119
features = new Features(
gitHubVersion,
repositoryNwo,
actionsUtil.getTemporaryDirectory(),
logger,
);

Check warning

Code scanning / CodeQL

Useless assignment to local variable Warning

The value assigned to features here is unused.

Copilot Autofix

AI about 17 hours ago

To fix the problem, we should remove the unused local variable and its assignment while preserving any intentional side effects from constructing Features. Instead of declaring let features and assigning to it, we can (a) remove the features declaration, and (b) replace features = new Features(...) with a bare new Features(...) call. This keeps the intended “initialise FFs” behavior but no longer suggests that a features value is used later.

Concretely in src/start-proxy-action.ts:

  • Delete the let features: Features | undefined; declaration at line 98.
  • Replace lines 113–119 that currently disable ESLint and assign to features with a single new Features(...) expression, keeping the parameters unchanged and removing the ESLint suppression because there will no longer be an unused identifier.

No new imports, methods, or other definitions are required.

Suggested changeset 1
src/start-proxy-action.ts

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/start-proxy-action.ts b/src/start-proxy-action.ts
--- a/src/start-proxy-action.ts
+++ b/src/start-proxy-action.ts
@@ -95,7 +95,6 @@
   // possible, and only use safe functions outside.
 
   const logger = getActionsLogger();
-  let features: Features | undefined;
   let language: KnownLanguage | undefined;
 
   try {
@@ -110,8 +109,7 @@
     // Initialise FFs, but only load them from disk if they are already available.
     const repositoryNwo = getRepositoryNwo();
     const gitHubVersion = await getGitHubVersion();
-    // eslint-disable-next-line @typescript-eslint/no-unused-vars
-    features = new Features(
+    new Features(
       gitHubVersion,
       repositoryNwo,
       actionsUtil.getTemporaryDirectory(),
EOF
@@ -95,7 +95,6 @@
// possible, and only use safe functions outside.

const logger = getActionsLogger();
let features: Features | undefined;
let language: KnownLanguage | undefined;

try {
@@ -110,8 +109,7 @@
// Initialise FFs, but only load them from disk if they are already available.
const repositoryNwo = getRepositoryNwo();
const gitHubVersion = await getGitHubVersion();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
features = new Features(
new Features(
gitHubVersion,
repositoryNwo,
actionsUtil.getTemporaryDirectory(),
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mbg mbg self-assigned this Feb 6, 2026
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