From 995c6d175ec5f790a80e9361aa9702371352b003 Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Wed, 14 Dec 2022 21:16:39 +0100 Subject: [PATCH] playbooks/dependencies: Avoid stale DNF caches on high-churn RPM repos Sometimes the RPM dependencies can't be installed because the DNF cache refers to old packages that have been replaced by newer builds on the RPM repositories [1]. This often happens on Fedora Rawhide because it sees a lot more churn than stable Fedoras. Currently, one has to keep restarting the tests manually by typing 'recheck' until the DNF caches eventually get updated. This is both very inefficient because it requires manual intervention; and wasteful because it can take several attempts and it doesn't just run the failing Ansible job, but all the other ones too. It will be good to force the DNF cache to be updated [2] when an Ansible job is being attempted more than once [3]. [1] https://github.com/containers/toolbox/pull/1171 https://github.com/containers/toolbox/pull/1200 [2] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-update_cache [3] https://zuul-ci.org/docs/zuul/latest/job-content.html#var-zuul.attempts https://github.com/containers/toolbox/pull/1201 --- playbooks/dependencies.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/dependencies.yaml b/playbooks/dependencies.yaml index b576463..b8500a0 100644 --- a/playbooks/dependencies.yaml +++ b/playbooks/dependencies.yaml @@ -17,6 +17,7 @@ - name: Install RPM packages become: yes package: + update_cache: "{{ true if zuul.attempts > 1 else false }}" name: - ShellCheck - bash-completion