Skip to content

Commit

Permalink
Add a test showing duplicate external config entries in event log
Browse files Browse the repository at this point in the history
Summary: See next diff for explanation

Reviewed By: IanChilds

Differential Revision: D68839204

fbshipit-source-id: b81042e9784ba84736965c0af81923ed64fa0afb
  • Loading branch information
ezgicicek authored and facebook-github-bot committed Jan 30, 2025
1 parent 647d2c4 commit 242d034
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions tests/core/build/test_external_buckconfigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,26 @@ async def test_external_buckconfigs(buck: Buck) -> None:
"--config-file",
f.name,
)
# Make a spurious file change to trigger DICE updater state comparison
with open(buck.cwd / "src", "w") as src:
src.write("test")

external_configs = await filter_events(
await buck.build(
"@root//mode/my_mode",
"//:test",
"-c",
"my_section.my_key=my_value",
"--config-file",
f.name,
)

buckconfig_input_values = await filter_events(
buck, "Event", "data", "Instant", "data", "BuckconfigInputValues", "components"
)
external_configs = external_configs[0]
# Currently, when there are file changes in between, we end up having two BuckconfigInputValues events.
# Will be fixed in the next diff.
assert len(buckconfig_input_values) == 2
external_configs = buckconfig_input_values[0]

assert len(external_configs) == 4
external_index = 0
Expand Down

0 comments on commit 242d034

Please sign in to comment.