Skip to content
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

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1074,11 +1074,6 @@ success_task:
- remote_system_test_aarch64
- rootless_remote_system_test
- rootless_system_test
- local_system_test
- local_system_test_aarch64
- remote_system_test
- rootless_remote_system_test
- rootless_system_test
- farm_test
- buildah_bud_test
- upgrade_test
Expand Down
11 changes: 11 additions & 0 deletions contrib/cirrus/cirrus_yaml_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,17 @@ def test_depends(self):
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
Expand Down