CL-6589: run-all tests must not inherit the caller's gate config - #297
Merged
Conversation
These cases assert the runner's own fan-out over a fixture workspace. With WORKBENCH_CHECK_SINCE exported, the spawned runner resolved the affected-package filter against the real repository instead of the fixture, so every probe package read as unaffected and the runner correctly reported nothing to do -- failing tests that are about something else entirely. CI never set the variable, so this passed there and failed only for a developer following the documented faster-gate workflow.
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.
Follow-up defect in my own CL-6589 change, found while using the new gate.
scripts/run-all.test.tsspawns the runner against a temporary fixture workspace, inheriting the caller's environment. WithWORKBENCH_CHECK_SINCEexported — the workflow CL-6589 documents and that agent lanes are now told to use — the spawned runner resolves the affected-package filter against the real repository's git rather than the fixture. Every probe package reads as unaffected, the runner correctly printsnothing affected by this change, and two cases fail for a reason that has nothing to do with what they assert:CI never sets the variable, so this is green there and red only for a developer following the documented faster workflow — the worst-shaped failure, since it looks like the developer broke something.
Fix: the helper strips
WORKBENCH_CHECK_SINCEfrom the inherited environment. A case that wants it sets it explicitly throughextraEnv. A test asserting the runner's own fan-out should control its environment rather than inherit ambient config.The second spawn site is unaffected: no fixture package defines that script, so
discovered.length === 0short-circuits before the filter runs.Verified by running the suite with
WORKBENCH_CHECK_SINCE=origin/mainset — the exact condition that failed. 13/13 pass, 27/27 across both runner suites.