-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Housekeeping: remove duplicates from success_task #24279
Conversation
LGTM |
Ephemeral COPR build failed. @containers/packit-build please check. |
diff --git a/contrib/cirrus/cirrus_yaml_test.py b/contrib/cirrus/cirrus_yaml_test.py
index f127ffbfa2..b19dd111ca 100755
--- a/contrib/cirrus/cirrus_yaml_test.py
+++ b/contrib/cirrus/cirrus_yaml_test.py
@@ -60,6 +60,18 @@ class TestDependsOn(TestCaseBase):
msg=('No success aggregation task depends_on "{0}"'.format(task_name))
self.assertIn(task_name, success_deps, msg=msg)
+ def test_duplicate_depends(self):
+ """Check for duplicate names in depends_on"""
+ for task_name in self.ALL_TASK_NAMES:
+ task = self.CIRRUS_YAML[task_name + '_task']
+ if 'depends_on' in task:
+ depends_on = task['depends_on']
+ seen = set()
+ for x in depends_on:
+ self.assertNotIn(x,seen, msg=f"depends_on contains duplicated names in task {task_name}")
+ seen.add(x)
+
+
def test_only_if(self):
"""2024-07 PR#23174: ugly but necessary duplication in only_if conditions. Prevent typos or unwanted changes."""
# N/B: This giant string is white space sensitive, take care when updating/modifying Some quick 5min from me, results in this one main:
|
Accidentally introduced in containers#21639. Thanks to Paul for the Python code to prevent this from happening again. Signed-off-by: Ed Santiago <santiago@redhat.com>
e0fbebc
to
b3302e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: edsantiago, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f668fd9
into
containers:main
Accidentally introduced in #21639.
There's probably a way to check for dups in cirrus_yaml_test.py
but my python is too rusty.
Signed-off-by: Ed Santiago santiago@redhat.com