From 11027e3e1ef9a58d5b2faa575a3764bd33cd2a08 Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Tue, 4 Jun 2024 12:23:27 -0400 Subject: [PATCH] Fix regex lines in zuul.d/* files Commit 260c968118934 broke the gate by causing jobs to not get run when it added RE2 compatibility for irrelevant-files. Digging found that RE2 doesn't support negative lookahead (and won't ever), so it's impossible to replace the previous pcre filter with a similar RE2 filter. Instead of reverting to the original filter, which is considered obsolete by zuul, this patch fixes the issue by explicitly listing all files under zuul.d/ except the one that we actually want to trigger the jobs: zuul.d/project.yaml. Listing all the files in the directory for every job is not ideal, and we may revisit it later, or perhaps even reconsider the extensive use of irrelevant-files in the neutron tree. This will have to wait for when the gate is in better shape though. [0] https://github.com/google/re2/issues/156 Related-bug: #2065821 Change-Id: I3bba89ac14414c6b7d375072ae92d2e0b5497736 --- zuul.d/base.yaml | 18 +++++++++--- zuul.d/grenade.yaml | 18 +++++++++--- zuul.d/job-templates.yaml | 9 ++++-- zuul.d/project.yaml | 9 ++++-- zuul.d/rally.yaml | 18 +++++++++--- zuul.d/tempest-multinode.yaml | 18 +++++++++--- zuul.d/tempest-singlenode.yaml | 54 ++++++++++++++++++++++++++-------- 7 files changed, 112 insertions(+), 32 deletions(-) diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index 8ffe90f66c1..8ba236acda0 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -35,8 +35,13 @@ - ^roles/add_mariadb_repo/.*$ - ^roles/nftables/.*$ - ^rally-jobs/.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml vars: configure_swap_size: 8192 Q_BUILD_OVS_FROM_GIT: True @@ -100,8 +105,13 @@ - ^roles/add_mariadb_repo/.*$ - ^roles/nftables/.*$ - ^rally-jobs/.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-fullstack-with-uwsgi diff --git a/zuul.d/grenade.yaml b/zuul.d/grenade.yaml index 0aa45b1057e..b65f6fefdde 100644 --- a/zuul.d/grenade.yaml +++ b/zuul.d/grenade.yaml @@ -35,8 +35,13 @@ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - ^vagrant/.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml vars: grenade_devstack_localrc: shared: @@ -252,8 +257,13 @@ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - ^vagrant/.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml roles: - zuul: openstack/neutron-tempest-plugin required-projects: diff --git a/zuul.d/job-templates.yaml b/zuul.d/job-templates.yaml index 9d81bc44199..0bf2cd495ce 100644 --- a/zuul.d/job-templates.yaml +++ b/zuul.d/job-templates.yaml @@ -22,8 +22,13 @@ - ^playbooks/.*$ - ^roles/.*$ - ^rally-jobs/.*$ - - regex: ^zuul.d/job-templates.yaml - negate: true + # Ignore everything except for zuul.d/job-templates.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/project.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - openstack-tox-py311: # from openstack-python3-jobs template timeout: 3600 irrelevant-files: *irrelevant-files diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 4af00ef0acb..9dfcd24a7a2 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -61,8 +61,13 @@ - ^neutron/scheduler/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml gate: jobs: diff --git a/zuul.d/rally.yaml b/zuul.d/rally.yaml index 4e727008ae7..3a8ca11112d 100644 --- a/zuul.d/rally.yaml +++ b/zuul.d/rally.yaml @@ -81,8 +81,13 @@ - ^neutron/common/ovn/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovn-rally-task @@ -126,8 +131,13 @@ - ^neutron/scheduler/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml vars: devstack_plugins: neutron: https://opendev.org/openstack/neutron diff --git a/zuul.d/tempest-multinode.yaml b/zuul.d/tempest-multinode.yaml index ed75d02eef9..8dfd899cd54 100644 --- a/zuul.d/tempest-multinode.yaml +++ b/zuul.d/tempest-multinode.yaml @@ -74,8 +74,13 @@ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - ^vagrant/.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml vars: tox_envlist: integrated-network devstack_localrc: @@ -405,8 +410,13 @@ - ^neutron/scheduler/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml roles: - zuul: zuul/zuul-jobs - zuul: openstack/neutron-tempest-plugin diff --git a/zuul.d/tempest-singlenode.yaml b/zuul.d/tempest-singlenode.yaml index 4f272b37193..71e350fc8c3 100644 --- a/zuul.d/tempest-singlenode.yaml +++ b/zuul.d/tempest-singlenode.yaml @@ -88,8 +88,13 @@ - ^neutron/common/ovn/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovs-tempest-dvr @@ -152,8 +157,13 @@ - ^neutron/common/ovn/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovs-tempest-iptables_hybrid @@ -262,8 +272,13 @@ - ^neutron/plugins/ml2/drivers/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovn-tempest-mariadb-full @@ -350,8 +365,13 @@ - ^neutron/plugins/ml2/drivers/mech_sriov/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovn-tempest-with-neutron-lib-master @@ -488,8 +508,13 @@ - ^vagrant/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovn-tempest-with-uwsgi-loki @@ -631,8 +656,13 @@ - ^neutron/scheduler/.*$ - ^roles/.*functional.*$ - ^playbooks/.*functional.*$ - - regex: ^zuul.d/project.*\.yaml - negate: true + # Ignore everything except for zuul.d/project.yaml + - ^zuul.d/base.yaml + - ^zuul.d/grenade.yaml + - ^zuul.d/job-templates.yaml + - ^zuul.d/rally.yaml + - ^zuul.d/tempest-multinode.yaml + - ^zuul.d/tempest-singlenode.yaml - job: name: neutron-ovn-tempest-ovs-release