Skip to content

Fail BATs teardown task if cleanup fails#2745

Open
beyhan wants to merge 1 commit into
mainfrom
failed-cleanup-fails-ci
Open

Fail BATs teardown task if cleanup fails#2745
beyhan wants to merge 1 commit into
mainfrom
failed-cleanup-fails-ci

Conversation

@beyhan

@beyhan beyhan commented Jun 19, 2026

Copy link
Copy Markdown
Member

We observe many orphaned disks in our GCP account. We shuld cleanup properly to avoid unnecessary costs.

We obsere many orphaned disks in our GCP account. We shuld cleanup
properly to avoid unnecessary costs.
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 23c6f048-8a43-40e2-904b-d77c1b613703

📥 Commits

Reviewing files that changed from the base of the PR and between a13a1db and db0d58f.

📒 Files selected for processing (1)
  • ci/bats/tasks/destroy-director.sh
💤 Files with no reviewable changes (1)
  • ci/bats/tasks/destroy-director.sh

Walkthrough

The ci/bats/tasks/destroy-director.sh script previously disabled Bash's exit-on-error behavior with set +e before executing BOSH deletion and cleanup commands. This change removes that set +e toggle, so the script retains the set -eu strict error handling established earlier and will now exit immediately if any subsequent BOSH command fails.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is incomplete. It only mentions the motivation (orphaned disks) but is missing all required sections from the template including what the change is about, contextual information, tests run, release notes, breaking changes, and team tags. Complete the pull request description using the template: add detailed explanation of the change, contextual links, test results, release notes, breaking change assessment, and team tags.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title accurately and concisely summarizes the main change: making the BATs teardown task fail when cleanup operations fail.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch failed-cleanup-fails-ci

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@beyhan

beyhan commented Jun 19, 2026

Copy link
Copy Markdown
Member Author

@aramprice, @rkoster this is the result of our FI WG discussion yesterday. We don't need to set max_orphaned_age_in_days because the BATs are setting up a director and then it gets teared down. The teardown takes care to cleanup all resource but failures in cleanup were ignored. That is why, I'm proposing this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

2 participants