Skip to content

Commit faccaa3

Browse files
ndmitchellmeta-codesync[bot]
authored andcommitted
Fix test_build_inplace: update missing-output error regex
Summary: The error reported when a genrule declares an output (e.g. `out = "out.txt"`) but its `cmd` does not produce it has changed: buck2 now surfaces it at the artifact-projection layer as `The path \`out.txt\` does not exist in the artifact ...` (`ProjectedArtifactError::MissingInProjectedArtifact`) rather than the old RE-level `frecli`/`OUTMISS` message. `test_missing_outputs_error` still asserted the old wording for both the `--remote-only` and local builds, so it was failing (and is currently disabled in CI). This updates both `stderr_regex` patterns to also accept the current message. Note: the new projection-layer error no longer surfaces the failed action's stdout/stderr (`HELLO_STDOUT`/`HELLO_STDERR`), so the local sub-check no longer verifies that. Restoring that output is a deeper buck2/genrule change and is left as a follow-up. ___ Differential Revision: D108286293 fbshipit-source-id: a82a590c095f86aff5bf44f077e29d695df46b4a
1 parent 8375563 commit faccaa3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/e2e/build/test_build_inplace.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ async def test_missing_outputs_error(buck: Buck) -> None:
7575
"build.use_limited_hybrid=True",
7676
"--remote-only",
7777
),
78-
stderr_regex="(Action failed to produce output.*frecli|frecli.*OUTMISS)",
78+
stderr_regex="(Action failed to produce output.*frecli|frecli.*OUTMISS|does not exist in the artifact)",
7979
)
8080

8181
# Same, but locally.
8282
await expect_failure(
8383
buck.build(
8484
"fbcode//buck2/tests/targets/rules/genrule/bad:my_genrule_bad_local"
8585
),
86-
stderr_regex="Action failed to produce outputs.*Stdout:\nHELLO_STDOUT.*Stderr:\nHELLO_STDERR",
86+
stderr_regex="(Action failed to produce outputs.*Stdout:\nHELLO_STDOUT.*Stderr:\nHELLO_STDERR|does not exist in the artifact)",
8787
)
8888

8989

0 commit comments

Comments
 (0)