From 049942db04bd811b6174d76d68b618500765a6eb Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 8 Jul 2024 10:49:48 +0200 Subject: [PATCH] cirrus: add missing test/tools to danger files This directory contains important tools such as ginkgo as such updates there should run through all testing and not skip anything. Technically we do not need to run system tests as it doesn't use any tool from there but that a) might change in the future and b) would make the only_if rules much more complicated if we try to exclude it and c) updates in test/tools are rare and/or automated so it does not cause inconveniences to run all anyway Signed-off-by: Paul Holzinger --- .cirrus.yml | 24 ++++++++++++------------ contrib/cirrus/CIModes.md | 1 + contrib/cirrus/cirrus_yaml_test.py | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2f0c84cf9f..72003e5a28 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -373,7 +373,7 @@ bindings_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('pkg/bindings/test/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: &build @@ -499,7 +499,7 @@ docker-py_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/python/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -526,7 +526,7 @@ unit_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('**/*_test.go') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -556,7 +556,7 @@ apiv2_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/apiv2/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -588,7 +588,7 @@ compose_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/compose/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -620,7 +620,7 @@ local_integration_test_task: &local_integration_test_task only_if: &only_if_int_test >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/e2e/**', 'test/utils/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -714,7 +714,7 @@ podman_machine_task: only_if: &only_if_machine_test >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('cmd/podman/machine/**', 'pkg/machine/**', '**/*machine*.go') depends_on: *build ec2_instance: @@ -837,7 +837,7 @@ local_system_test_task: &local_system_test_task only_if: &only_if_system_test >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/system/**') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -929,7 +929,7 @@ minikube_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/minikube/**', 'test/system/*.bash') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) # 2024-05-21: flaking almost constantly since March. @@ -955,7 +955,7 @@ farm_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/farm/**', 'test/system/*.bash') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build @@ -979,7 +979,7 @@ buildah_bud_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('**/*build*.go', 'test/buildah-bud/**') depends_on: *build env: @@ -1007,7 +1007,7 @@ upgrade_test_task: only_if: >- $CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || - changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || + changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || changesInclude('test/upgrade/**', 'test/system/*.bash') || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**')) depends_on: *build diff --git a/contrib/cirrus/CIModes.md b/contrib/cirrus/CIModes.md index 461fdc94de..cea7d13bdb 100644 --- a/contrib/cirrus/CIModes.md +++ b/contrib/cirrus/CIModes.md @@ -54,6 +54,7 @@ uses the following main rules: - `Makefile` (make targets are used to trigger tests) - `contrib/cirrus/**` (cirrus scripts to run the tests) - `vendor/**` (dependency updates) + - `test/tools/**` (test dependency code, i.e. ginkgo) - `hack/**` (contains scripts used by several tests) - `version/rawversion/*` (podman version changes, intended to ensure all release PRs test everything to not release known broken code) diff --git a/contrib/cirrus/cirrus_yaml_test.py b/contrib/cirrus/cirrus_yaml_test.py index 109b53c4be..b1d295690b 100755 --- a/contrib/cirrus/cirrus_yaml_test.py +++ b/contrib/cirrus/cirrus_yaml_test.py @@ -62,7 +62,7 @@ class TestDependsOn(TestCaseBase): def test_only_if(self): """2024-07 PR#23174: ugly but necessary duplication in only_if conditions. Prevent typos or unwanted changes.""" - beginning = "$CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'hack/**', 'version/rawversion/*') || " + beginning = "$CIRRUS_PR == '' || $CIRRUS_CHANGE_TITLE =~ '.*CI:ALL.*' || changesInclude('.cirrus.yml', 'Makefile', 'contrib/cirrus/**', 'vendor/**', 'test/tools/**', 'hack/**', 'version/rawversion/*') || " real_source_changes = " || (changesInclude('**/*.go', '**/*.c') && !changesIncludeOnly('test/**', 'pkg/machine/e2e/**'))" for task_name in self.ALL_TASK_NAMES: