Skip to content

Add opt-in cleanup for failed releases - #2186

Open
YukiJikumaru wants to merge 1 commit into
capistrano:masterfrom
YukiJikumaru:remove-failed-release
Open

Add opt-in cleanup for failed releases#2186
YukiJikumaru wants to merge 1 commit into
capistrano:masterfrom
YukiJikumaru:remove-failed-release

Conversation

@YukiJikumaru

Copy link
Copy Markdown

Summary

Add an opt-in :remove_failed_release setting, defaulting to false, to remove a failed release_path after deploy:failed.

This helps prevent failed release directories from consuming :keep_releases slots and causing older working releases to be cleaned up. The cleanup is conservative: Capistrano skips removal when current resolves to the same release, preserving a release that has already been published.

This PR also documents the new setting and adds Cucumber coverage for:

  • default behavior, where failed releases are kept
  • enabled cleanup, where failed releases are removed
  • preserving the failed release when it is also the current release

Refs #2120.
Refs #1907.

Short checklist

  • Did you run bundle exec rubocop -a to fix linter issues?
  • If relevant, did you create a test?
  • Did you confirm that the RSpec tests pass?

Other Information

Verified locally with:

  • bundle exec cucumber features/remove_failed_release.feature
  • bundle exec rake rubocop
  • bundle exec rake spec

Add a :remove_failed_release setting, defaulting to false, to remove a
failed release_path after deploy:failed. Skip removal when current resolves
to the same release.

Document the setting and add Cucumber coverage for the default behavior,
enabled cleanup, and preserving the current release.

Refs capistrano#2120.
Refs capistrano#1907.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant