Skip to content

feat: allow resuming a partial promote without manual cleanup - #223

Merged
matthiasL-scality merged 1 commit into
mainfrom
feat/resume-partial-promote
Aug 10, 2026
Merged

feat: allow resuming a partial promote without manual cleanup#223
matthiasL-scality merged 1 commit into
mainfrom
feat/resume-partial-promote

Conversation

@matthiasL-scality

Copy link
Copy Markdown
Contributor

Summary

  • When a promote is interrupted mid-way (network timeout, stream abort), the target bucket contains some files but no .final_status. Previously this caused an immediate FAILED on retry, requiring manual bucket deletion.
  • Partial target (files present, no .final_status): records existing files and skips them in the copy loop — only missing objects are transferred.
  • Complete target (.final_status present): rejected immediately with FAILED: target already fully promoted to prevent silent overwrites.

Test plan

  • test_resume_partial_promote — pre-populates 2 of 5 source objects in the target (no .final_status), runs promote, verifies all 5 objects + .final_status are present in the completed target
  • test_resume_already_complete_promote — runs a full promote then retries, verifies the retry is rejected with the new error message
  • test_copy_fails_when_target_already_exists — updated assertion to match new FAILED: target already fully promoted message
  • All existing copy tests still pass

🤖 Generated with Claude Code

When a promote is interrupted mid-way (e.g. the rc.3 stream abort), the
target bucket contains some but not all source objects and no .final_status.
Re-running the promote previously failed immediately with "FAILED" because
the target was not empty, forcing a manual bucket deletion before retry.

The new logic distinguishes two cases:
- Partial target (files present, no .final_status): records existing files
  and filters them from the copy loop so only missing objects are copied.
- Complete target (.final_status present): fails with a clear message to
  prevent silent overwrites of a finished promotion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@matthiasL-scality
matthiasL-scality requested a review from a team as a code owner August 7, 2026 12:11
@claude

claude Bot commented Aug 7, 2026

Copy link
Copy Markdown

LGTM

Review by Claude Code

@matthiasL-scality
matthiasL-scality merged commit 64cbee8 into main Aug 10, 2026
5 checks passed
@matthiasL-scality
matthiasL-scality deleted the feat/resume-partial-promote branch August 10, 2026 12:28
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