swarms: deterministic join/union scenario names and seeded sampling - #171
Open
CarlosFelipeOR wants to merge 3 commits into
Open
CarlosFelipeOR wants to merge 3 commits into
CarlosFelipeOR wants to merge 3 commits into
Conversation
Scenario names embedded the tables' SQL, which carries getuid() table names, so every run produced different names. Names are now just "join N of 1000" / "union N of 500"; the parameters are in the scenario's arguments in the log. The combination sample is drawn from a per-run seed (random, or --seed) with its own random.Random, so each run covers different combinations and any run can be reproduced. The union per-scenario choices (UNION ALL/DISTINCT, object_storage_cluster settings) are drawn in the feature instead of inside the parallel scenarios. Remove the "join 455 of 816480" xfail for #1244: it had already stopped matching the intended combination. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…N_ID "join N of <total>" is now the combination's position in the full product plus its parameters, so the same name is always the same combination. The seed defaults to GITHUB_RUN_ID, so all jobs of a CI run and their reruns sample the same combinations. Union ALL/DISTINCT and object_storage_cluster (None = unset) are now part of the combination. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
/swarms/feature/swarm joins/join clause/*and/swarms/feature/swarm union/union clause/*built the scenario name from the tables' SQL. Iceberg and MergeTree tables are named withgetuid(), so the names changed on every run:The number was the position in the sample, and the sample was fixed by
random.seed(42), so every run executed the same 1000 of the 816480 join combinations (mostly the same 500 union combinations). Even so, the samejoin Nhas pointed to three different combinations since July, because the global RNG is also consumed elsewhere (every index moved on 2026-08-18).Change
join N of <total>: <parameters>, whereNis the combination's position in the full product. The same name is always the same combination, in any run.--seed, elseGITHUB_RUN_ID, else random, and is printed at the start of the feature ([note] join combinations seed: <seed>). All jobs of a CI run, and a rerun of any of them, execute the same combinations; different runs cover different combinations.random.Random(seed), so otherrandomcalls can no longer shift it.iceberg_table_data1,s3Cluster_data2, ...) replace the SQL in the name. The join condition is shown without thet1./t2.prefixes.UNION ALL/UNION DISTINCTand theobject_storage_clustersetting of each side (None= unset) are now part of the combination instead of being drawn inside the parallel scenarios. Total is 31752 (was 11664 plus random choices). Each side is now unset in 1 of 7 combinations instead of 1 of 2, and combinations whose cluster was not used are gone.join 455 of 816480*xfail (#1244): since 2026-08-18 that index was a different combination, so it already did not cover the issue. It is not replaced in this PR.Examples:
Reproducing a failure
Use the seed of the failed run (its
GITHUB_RUN_ID, also printed in the log); otherwisejoin Nis probably not in the sample:Things to be aware of
clickhouse_regression_resultsis sparse.job_url.swarm_steps) still uses the globalrandom.seed(42), unchanged.Verification (local, antalya 26.6.4,
--with-analyzer)GITHUB_RUN_ID--seedGITHUB_RUN_ID(real run id)GITHUB_RUN_ID--seedIn every run, each
join N/union Nreceived exactly combinationNof the full product, its name matched its arguments, and the ids matched the sample recomputed offline from the seed. For union, the executed queries carried exactly the expectedobject_storage_clustersettings.🤖 Generated with Claude Code