add leftovers to on_failure.#684
Conversation
make leftovers a function and make it reuasable
|
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 (2)
WalkthroughThe CI configuration now renders the BOSH bootloader pipeline with 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
aramprice
left a comment
There was a problem hiding this comment.
Thanks for tackling this @ramonskie !
There was a problem hiding this comment.
Pull request overview
This PR refactors the Concourse pipeline to make the “leftovers” cleanup step reusable and adds it to additional failure paths, aiming to reduce leaked GCP resources. It also updates the pipeline configuration script to render the ytt-templated pipeline before calling fly set-pipeline.
Changes:
- Introduce a ytt
leftovers_task(env_name, state_dir)function in the pipeline and replace duplicated leftovers task blocks with function calls. - Add leftovers steps into multiple
on_failure/ cleanup sequences across the GCP CF + GCP Concourse bump-deployments jobs. - Update
ci/configure.shto render the pipeline viayttinto a temp file and set the pipeline from the rendered output.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
ci/pipelines/bosh-bootloader.yml |
Adds a reusable ytt leftovers task and wires leftovers into several failure/cleanup paths. |
ci/configure.sh |
Renders the ytt-templated pipeline to a temp file before running fly set-pipeline. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| params: | ||
| rebase: true | ||
| repository: updated-bbl-state | ||
| - #@ leftovers_task("bump-deployments-downstream", "bump-deployments/bbl-gcp-cf") |
| params: | ||
| rebase: true | ||
| repository: updated-bbl-state | ||
| - #@ leftovers_task("bump-deployments-downstream", "bump-deployments/bbl-gcp-cf") |
| rebase: true | ||
| repository: updated-bbl-state | ||
|
|
||
| - #@ leftovers_task("bump-deployments-downstream", "bump-deployments/bbl-gcp-cf") |
| params: | ||
| rebase: true | ||
| repository: updated-bbl-state | ||
| - #@ leftovers_task("bump-deployments-downstream", "bump-deployments/bbl-gcp-cf") |
| params: | ||
| rebase: true | ||
| repository: updated-bbl-state | ||
| - #@ leftovers_task("bump-deployments-gcp-concourse", "bump-deployments/bbl-gcp-concourse") |
| params: | ||
| rebase: true | ||
| repository: updated-bbl-state | ||
| - #@ leftovers_task("bump-deployments-gcp-concourse", "bump-deployments/bbl-gcp-concourse") |
| rebase: true | ||
| repository: updated-bbl-state | ||
|
|
||
| - #@ leftovers_task("bump-deployments-gcp-concourse", "bump-deployments/bbl-gcp-concourse") |
| pipeline="$(mktemp)" | ||
| trap 'rm -f "${pipeline}"' EXIT | ||
|
|
||
| ytt -f ci/pipelines/bosh-bootloader.yml --ignore-unknown-comments > "${pipeline}" | ||
|
|
make leftovers a function and make it reusable
we set leftovers on each on failure task. and hope that this will stop the resource leakages