From 617cff00b4da47cf4ecde02f9269269a5e679a20 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 2 Jul 2025 15:59:10 -0700 Subject: [PATCH] Update sync-project-config to delete When we synchronize the project-config repo to remote hosts, we don't delete existing files. This can cause problems for systems (like grafyaml) that iterate over all files present. Enable the delete option to correct this. Also, add some file triggers so this is exercised and deployed appropriately. Change-Id: Ia189fdfede5b17178907d01ca4a75d9e1fbaaaf5 --- playbooks/roles/sync-project-config/tasks/main.yaml | 1 + zuul.d/infra-prod.yaml | 6 ++++++ zuul.d/system-config-run.yaml | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/playbooks/roles/sync-project-config/tasks/main.yaml b/playbooks/roles/sync-project-config/tasks/main.yaml index 8c54d4989e..6c44dbb241 100644 --- a/playbooks/roles/sync-project-config/tasks/main.yaml +++ b/playbooks/roles/sync-project-config/tasks/main.yaml @@ -7,4 +7,5 @@ synchronize: src: '{{ project_config_src }}/{{ project_config_subdir }}' dest: '{{ project_config_dest }}' + delete: true no_log: '{{ silence_synchronize }}' diff --git a/zuul.d/infra-prod.yaml b/zuul.d/infra-prod.yaml index aba52954c8..945e4278cf 100644 --- a/zuul.d/infra-prod.yaml +++ b/zuul.d/infra-prod.yaml @@ -203,6 +203,7 @@ - playbooks/roles/install-docker/ - playbooks/roles/iptables/ - playbooks/roles/nodepool + - playbooks/roles/sync-project-config - playbooks/templates/clouds/nodepool_ - job: @@ -420,6 +421,7 @@ - playbooks/roles/iptables/ - playbooks/roles/zookeeper/ - playbooks/roles/zuul + - playbooks/roles/sync-project-config - roles/kerberos-client/ - roles/openafs-client/ @@ -468,6 +470,7 @@ - playbooks/roles/install-docker/ - playbooks/roles/iptables/ - playbooks/roles/gerrit/ + - playbooks/roles/sync-project-config - zuul.d/docker-images/gerrit.yaml - job: @@ -534,6 +537,7 @@ - playbooks/roles/logrotate - playbooks/roles/matrix-eavesdrop - playbooks/roles/matrix-gerritbot + - playbooks/roles/sync-project-config - playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 - docker/accessbot/ - docker/ircbot @@ -552,6 +556,7 @@ - accessbot/channels.yaml - playbooks/run-accessbot.yaml - playbooks/roles/accessbot + - playbooks/roles/sync-project-config - docker/accessbot/ - job: @@ -588,6 +593,7 @@ - playbooks/roles/grafana - playbooks/roles/logrotate - playbooks/roles/iptables/ + - playbooks/roles/sync-project-config - job: name: infra-prod-service-graphite diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index f5834fe2aa..9ea06c2057 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -215,6 +215,7 @@ - playbooks/roles/matrix-gerritbot - playbooks/roles/statusbot - playbooks/roles/ptgbot + - playbooks/roles/sync-project-config - playbooks/zuul/templates/group_vars/eavesdrop.yaml.j2 - docker/accessbot/ - docker/ircbot @@ -367,6 +368,7 @@ - inventory/service/group_vars/nodepool-launcher.yaml - playbooks/roles/configure-openstacksdk/ - playbooks/roles/nodepool + - playbooks/roles/sync-project-config - playbooks/templates/clouds/ - playbooks/nodepool_restart.yaml - testinfra/test_nodepool.py @@ -758,6 +760,7 @@ - playbooks/roles/install-docker/ - playbooks/roles/pip3/ - playbooks/roles/run-selenium/ + - playbooks/roles/sync-project-config - playbooks/zuul/templates/group_vars/grafana - tesinfra/util.py - testinfra/test_grafana.py @@ -1047,6 +1050,7 @@ - playbooks/roles/zookeeper/ - playbooks/roles/install-apt-repo/ - playbooks/roles/zuul.* + - playbooks/roles/sync-project-config - playbooks/zuul/templates/group_vars/zuul.* - playbooks/zuul/templates/group_vars/zookeeper.yaml - playbooks/zuul/templates/group_vars/zuul-lb.yaml.j2 @@ -1098,6 +1102,7 @@ - testinfra/util.py - playbooks/roles/install-docker/ - playbooks/roles/gerrit/ + - playbooks/roles/sync-project-config - playbooks/zuul/gerrit/ - playbooks/zuul/templates/host_vars/review99.opendev.org.yaml.j2 - roles/bazelisk-build/