Repository navigation
fix(arc): stop the registry cache install loop resolving the container resources setting - #72
Conversation
…r resources setting Ansible templates a task's loop before it evaluates the enclosing block's when, so with the cache off the install task still resolved its loop. The loop named github_runner_arc_registry_cache_resources, which the render task only sets as a fact when the cache is on and which otherwise is the role default for the cache containers' requests and limits: a dict, so the run failed with "The loop value must resolve to a list, not dict". The rendered manifests now have their own variable, github_runner_arc_registry_cache_manifests, and the container setting keeps its name. The install tasks are tested against a stand-in for kubernetes.core with the cache off and on, in a normal run and in check mode. Refs #71
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex security review |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
|
🎉 This PR is included in version 1.26.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Running the
github_runner_arcrole with the registry cache off (the default) fails atRegistry cache: install the cachewith "Theloopvalue must resolve to a 'list', not 'dict'". It is not specific to--check; a normal run fails the same way.Ansible templates a task's
loopbefore it evaluateswhen, so the block'swhen: github_runner_arc_registry_cache_enabled | booldoes not stop the loop being resolved. The loop wasgithub_runner_arc_registry_cache_resources, whichrender_registry_cache.ymlonly sets as a fact when the cache is on. With it off the name is the role default, the cache containers' requests and limits, which is a dict. The name was used for both things.The rendered manifests now live in
github_runner_arc_registry_cache_manifests, so the loop can never resolve to the container setting; the documentedgithub_runner_arc_registry_cache_resourcesinput is unchanged.Tested by running
install_registry_cache.ymlthrough a newtests/registry_cache/install.ymlagainst a stand-inkubernetes.corecollection that records module calls, with the cache off and on, in a normal run and with--check. Off asserts the removal calls and that nothing is applied; on asserts the five rendered resources are applied in order. Both off cases fail on main with the error above and pass with the change. The unit suite andansible-lint --profile productionpass locally. The kind integration workflow was not run locally.This changes no live fleet; a consumer picks it up after a release and a re-pin.
Refs #71