[rush] Add experiment to trim RUSH_ env vars forwarded to operation processes - #5994
Open
Ian Clanton-Thuon (iclanton) with Copilot wants to merge 3 commits into
Open
[rush] Add experiment to trim RUSH_ env vars forwarded to operation processes#5994Ian Clanton-Thuon (iclanton) with Copilot wants to merge 3 commits into
Ian Clanton-Thuon (iclanton) with Copilot wants to merge 3 commits into
Conversation
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Member
|
Copilot - take a look at the comments. |
Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Ian Clanton-Thuon (iclanton)
marked this pull request as ready for review
August 28, 2026 07:58
Ian Clanton-Thuon (iclanton)
enabled auto-merge (squash)
August 28, 2026 08:03
Member
|
Copilot - Can you investigate the build failure? |
…g-convention rule Co-authored-by: iclanton <5010588+iclanton@users.noreply.github.com>
Contributor
Author
All 6 CI jobs failed for the same reason: |
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
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.
Rush forwards nearly its entire process environment to operation processes (build/test scripts), including internal
RUSH_-prefixed variables that operation scripts have no business depending on. This adds an opt-in experiment to exclude them.Experiment flag
trimRushEnvironmentVariablesForOperationsboolean added toIExperimentsJsonandexperiments.schema.json. Disabled by default; no behavior change unless a repo opts in viaexperiments.json.Filtering plugin
TrimRushEnvironmentVariablesPlugintaps the existingcreateEnvironmentForOperationwaterfall hook (same extension point asIgnoredParametersPlugin/NodeDiagnosticDirPlugin) and deletes any env var whose name starts withRUSH_(case-insensitive), e.g.:RUSHSTACK_*and other non-RUSH_variables are left untouched.Wiring
PhasedScriptActionregisters the plugin before other env-forwarding plugins only when the experiment is enabled, scoping the trim strictly to operation processes (build/test/etc.), notrushx, event hooks, or custom global commands.Docs/API
common/reviews/api/rush-lib.api.mdfor the new publicIExperimentsJsonmember and added a changelog entry for@microsoft/rush-lib.