CI: Properly namespace directors#2742
Conversation
The cleanup-leftover-environemnts task in the bats job was unintentionally targeting directors from other jobs that run concurrently, leading to failures of those jobs or the cleanup. This happened because each job shared the same deploy-director script, which named the director "bats-director", and the leftover filter used was just "bats". Instead, use the name of the environment to name the director. As an additional upside, now all the other *-cleanup-leftovers jobs will correctly clean up their own directors as well. ai-assisted=yes [TNZ-88995]
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe deploy-director script now dynamically derives the director name from the environment metadata's network field using jq, defaulting to 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
Example: https://bosh.ci.cloudfoundry.org/teams/main/pipelines/bosh-director/jobs/bats/builds/519 |
|
It also unintentionally deleted bats vms from the stemcell pipeline, working on a fix for that as well: |
The cleanup-leftover-environemnts task in the bats job was unintentionally targeting directors from other jobs that run concurrently, leading to failures of those jobs or the cleanup.
This happened because each job shared the same deploy-director script, which named the director "bats-director", and the leftover filter used was just "bats". Instead, use the name of the environment to name the director.
As an additional upside, now all the other *-cleanup-leftovers jobs will correctly clean up their own directors as well.