Repository navigation
fix(deploy): a role's source path no longer depends on the playbook's folder (#20509) - #20515
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 23 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
✅ SSOT Configuration Compliance: Passing🎉 No new hardcoded values of either class — Known backlog in |
|
Code review on PR #20515 (head 4327b23): changes needed. The 8
|
…tern rather than one spelling (#20509)
|
Code review on PR #20515 (head bda4c67): approve. The three remaining sites now climb the right depth from |
Auto-sync: merging
|
| side | commit | subject | issue refs |
|---|---|---|---|
| main | 63bfb6599 |
fix(guard): the playbook reference guard declares its reach (#19611) | #19611 |
| main | 4e9c146eb |
Merge main into issue-19611-playbook-refs (auto-sync) [skip ci] | none |
| main | da8d28608 |
guard(docs): the playbook guard reads role tables and the registry, and counts references (#19611) | #19611 |
| main | cd1d91bcd |
guard(docs): the playbook reference guard is registered, and the guide uses a placeholder (#19611) | #19611 |
| this branch | 4327b239f |
fix(deploy): a role's source path no longer depends on the playbook's folder (#20509) | #20509 |
repo_tests/reach_scope_claim_17844_test.py
| side | commit | subject | issue refs |
|---|---|---|---|
| main | 8a3558ef3 |
fix(guard): the reference sweep survives an empty tree and claims the trees it finds (#19611) | #19611 |
| main | 63bfb6599 |
fix(guard): the playbook reference guard declares its reach (#19611) | #19611 |
| main | 4e9c146eb |
Merge main into issue-19611-playbook-refs (auto-sync) [skip ci] | none |
| main | da8d28608 |
guard(docs): the playbook guard reads role tables and the registry, and counts references (#19611) | #19611 |
| main | cd1d91bcd |
guard(docs): the playbook reference guard is registered, and the guide uses a placeholder (#19611) | #19611 |
| this branch | 4327b239f |
fix(deploy): a role's source path no longer depends on the playbook's folder (#20509) | #20509 |
Thinking Path
The Full-Tree Drift Check caught
autobot-ai-stack/ai_api_server.py31 lines off source. The role copied from{{ playbook_dir }}/../../../..., andplaybook_dirdepends on the playbook's folder: fromansible/playbooks/that reaches the repo root, and fromansible/it reaches one level above. So a role deploy read a stale sibling tree and put months-old code on the host. Evidence is on #20509.What Changed
roles/now use{{ role_path }}/../../../../, whose depth is fixed. In_sharedtasks, also included fromupdate-all-nodes.ymlwhere no role is active, it falls back toplaybook_dirat the known depth.playbook_dir, in the{{ }}or~spelling, with contrasts and a declared reach.backend_services's "Copy AutoBot application files" now always copiesansible/, what it copied fromplaybooks/. Fromansible/it used to copy all ofautobot-slm-backend. What that task is for was not established; I kept the behaviour of the pathdeploy-full.ymluses.data-migration.ymlandenroll-node.yml, plusupdate-all-nodes.yml, live inplaybooks/, where the depth is right. Left as they are.Verification
role_source_paths_depth_proof_20509_test.pyand the reach guards pass locally; only these. A realansible-playbookon a throwaway tree, from bothansible/andansible/playbooks/, resolved role and_sharedpaths to the repo root each time. Not run on a host, so this saysRefs.Worth reviewing:
_shared/tasks/install_agent_autobot_shared.ymlclimbs withdirnamethree times fromplaybook_dir. Its callers are all inplaybooks/, so it is right today; the guard does not read that spelling.playbook_executor.py's fallback to the deployed ansible dir still resolves to the stale tree; filed as decision(deploy): the playbook executor's fallback can run roles against a stale tree #20520, with options.aimlgroup should, from its own archive; that is the third criterion._sharedtask included by a playbook atansible/root with no active role would still be one level off. The current callers are roles andupdate-all-nodes.yml.Model Used
Claude Opus 5.5
Refs #20509
🤖 Generated with Claude Code