Skip to content

Prevent DropletUpload from downgrading a staged droplet to failed#5244

Open
svkrieger wants to merge 1 commit into
mainfrom
fix-droplet-upload-staged-guard
Open

Prevent DropletUpload from downgrading a staged droplet to failed#5244
svkrieger wants to merge 1 commit into
mainfrom
fix-droplet-upload-staged-guard

Conversation

@svkrieger

Copy link
Copy Markdown
Contributor

Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:

A short explanation of the proposed change:

Prevent a droplet in state STAGED to be downgraded to FAILED

An explanation of the use cases your change solves

If a worker is killed mid-job and restarts, it re-locks and re-runs its own job. When another worker already completed the job in the meantime, the droplet is already STAGED. The rescue block would unconditionally overwrite STAGED with FAILED in that case.

Links to any other associated PRs

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

If a worker is killed mid-job and restarts, it re-locks and re-runs its
own job. When another worker already completed the job in the meantime,
the droplet is already STAGED. The rescue block would unconditionally
overwrite STAGED with FAILED in that case.

Skip the state transition and log when the droplet is already staged.
@svkrieger svkrieger force-pushed the fix-droplet-upload-staged-guard branch from 314b521 to 534856f Compare June 30, 2026 07:39
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