Skip to content

feat: move cleanup after hardening, to have more extensibility - #701

Draft
h0nIg wants to merge 1 commit into
cloudfoundry:ubuntu-jammyfrom
sap-contributions:ubuntu-jammy-cleanuporder
Draft

feat: move cleanup after hardening, to have more extensibility#701
h0nIg wants to merge 1 commit into
cloudfoundry:ubuntu-jammyfrom
sap-contributions:ubuntu-jammy-cleanuporder

Conversation

@h0nIg

@h0nIg h0nIg commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Move bosh_harden before bosh_clean to establish a clear ordering:
stages that require network access or install packages must run before bosh_clean zeros out /etc/resolv.conf and removes build-environment artifacts. Stages that follow bosh_clean - such as bosh_clean_ssh and udev_aws_rules - only manipulate static files and do not require DNS resolution.

This ordering makes the boundary explicit: bosh_clean separates network-dependent preparation from network-independent configuration, and any future hardening or customization stage inserted in this window inherits the correct invariant without needing to re-introduce DNS availability manually.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@h0nIg, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 33c5789e-3768-41e8-bd0b-67c0127ac988

📥 Commits

Reviewing files that changed from the base of the PR and between d62a792 and e877bd7.

📒 Files selected for processing (2)
  • bosh-stemcell/lib/bosh/stemcell/stage_collection.rb
  • bosh-stemcell/spec/bosh/stemcell/stage_collection_spec.rb

Walkthrough

The stage sequences for OpenStack, CloudStack, vSphere/vCloud, AWS, Alicloud, Google, Warden, and Azure now run bosh_harden before bosh_clean. The Softlayer sequence remains unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that cleanup moves after hardening and identifies the extensibility goal.
Description check ✅ Passed The description clearly explains the stage reordering, its technical rationale, and its extensibility benefit.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@bosh-stemcell/lib/bosh/stemcell/stage_collection.rb`:
- Around line 160-161: Update the AWS stage-order expectation in the stage
collection spec to match the new order, asserting :bosh_harden before
:bosh_clean. Keep the remaining expected stage sequence unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4c3b10e4-c3e1-4598-9fbf-d4aa9fc5461c

📥 Commits

Reviewing files that changed from the base of the PR and between 3b50641 and d62a792.

📒 Files selected for processing (1)
  • bosh-stemcell/lib/bosh/stemcell/stage_collection.rb

Comment thread bosh-stemcell/lib/bosh/stemcell/stage_collection.rb
@h0nIg
h0nIg force-pushed the ubuntu-jammy-cleanuporder branch from 511d7a3 to e877bd7 Compare July 31, 2026 13:44
@github-project-automation github-project-automation Bot moved this from Waiting for Changes | Open for Contribution to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jul 31, 2026
@h0nIg
h0nIg marked this pull request as draft July 31, 2026 15:50
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.

1 participant