test(compile): fix named-pool 1ES test on Windows CRLF checkout#1487
Merged
Conversation
The named-pool-demands fixture is checked out with CRLF line endings on Windows (core.autocrlf=true, no .gitattributes override). The test helper injected `target: 1es` with a `\n`-anchored replacen that never matched CRLF content, so the override was silently dropped and the fixture compiled as the default standalone target, failing the extends.parameters.pool assertion. Normalize CRLF to LF before injecting the target so the override applies regardless of checkout line endings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: df9064a5-39c8-42a8-b605-4cba91f17dc8
Contributor
🔍 Rust PR ReviewSummary: Looks good — correct, minimal fix for the Windows CRLF test failure. Findings✅ What Looks Good
|
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.
Summary
The Daily Build failed only on Windows on 12 & 13 July via the test
test_named_pool_demands_compile_to_1es_shared_pool(tests/compiler_tests.rs), panicking with1ES output should contain extends.parameters.pool mapping.Root cause (test bug introduced by #1461 feat(compile): support named pool demands):
named-pool-demands-agent.mdfixture with CRLF line endings (core.autocrlf=true, no.gitattributesoverride for fixtures).compile_named_pool_demands_fixture_for_targetinjectedtarget: 1esviareplacen("description: \"...\"\n", ...)using a bare\n.target: 1eswas silently dropped. The fixture then compiled as the default standalone target — which has noextends.parameters.pool— tripping the assertion.job/stagecases passed vacuously (standalone still exposes anAgentjob with a pool), so only the 1ES case surfaced the bug.Fix: normalize
\r\n→\nin the transform closure before thereplacen, so the target override applies regardless of checkout line endings. This is purely a test-harness issue; the compiler itself was never broken.Test plan
cargo test --test compiler_tests named_pool→ 3 passed (previously failed on Windows)cargo test --test compiler_tests→ 184 passed, 0 failed (on Windows)