feat: add bidirectionalLabelMatch option and deprecate exactMatch#5031
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
34b7069 to
f597650
Compare
f86dfa0 to
7a14043
Compare
187cc9d to
8018959
Compare
8018959 to
e61882b
Compare
f793d18 to
e61882b
Compare
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
|
@copilot resolve the merge conflicts in this pull request |
Merge conflicts resolved in commit Two files had conflicts:
Also updated the test file to correctly pass both parameters (36 tests passing). |
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
Upstream-PR: github-aws-runners#5031 Signed-off-by: Brend Smits <brend.smits@philips.com>
|
@copilot resolve the merge conflicts in this pull request |
Merge conflicts resolved in commit 8 files had conflicts:
All 92 tests pass. |
|
@Brend-Smits Some commits are not signed. I am ready to merge, just need you to fix the commits first |
66ec55e to
9ad4e17
Compare
09229f7 to
ffc2cc0
Compare
Thanks for having a look! Apologies for that. I think something went wrong in the merge.... Can you have another look? |
Introduce a new bidirectionalLabelMatch option that performs strict two-way label matching (runner labels must equal workflow labels as a set). This preserves the existing exactMatch behavior (unidirectional subset check) to avoid breaking changes. The bidirectionalLabelMatch option for runner label matching requires labels to be identical in both directions. Previously, a runner with labels [A, B, C, D] would match a job requesting [A, B, C] when exactMatch was true. Now, bidirectionalLabelMatch=true requires the labels to be exactly identical - the runner will only match if the job requests exactly [A, B, C, D]. Signed-off-by: Brend Smits <brend.smits@philips.com>
3068376 to
30e66d8
Compare
Description
Introduce a new
bidirectionalLabelMatchoption that performs strict two-way label matching (runner labels must equal workflow labels as a set). This preserves the existingexactMatchbehavior (unidirectional subset check) to avoid breaking changes.The
bidirectionalLabelMatchoption requires labels to be identical in both directions. Previously, a runner with labels[A, B, C, D]would match a job requesting[A, B, C]whenexactMatchwastrue. WithbidirectionalLabelMatch=true, the runner will only match if the job requests exactly[A, B, C, D].exactMatchwas supposed to have this behavior, but to avoid breaking changes, the variable will be deprecated to give users time to migrate.Changes:
bidirectionalLabelMatchtoMatcherConfiginterface (optional, defaults tofalse)canRunJobto support bidirectional matching when enabled — now accepts bothbidirectionalLabelMatchandenableDynamicLabelsparameters; bidirectional matching correctly respects dynamic label sanitizationexactMatchin Terraform variables with migration guidancebidirectionalLabelMatchto multi-runner and webhook variable typesenable_runner_bidirectional_label_matchMigration: To migrate, use
bidirectionalLabelMatchinstead ofexactMatchin your runner configs. Then either:runs-onCo-authored-by: Stuart Pearson
Test Plan
dispatch.test.tscovering bidirectional label matching, interaction withexactMatch, case-insensitivity, empty labels, and combined use withenableDynamicLabels— 36 tests passingRelated Issues