Skip to content

Make buildpack position updates concurrency-safe - #5497

Open
serdarozerr wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:fix/buildpacks-position
Open

serdarozerr wants to merge 1 commit into
cloudfoundry:mainfrom
sap-contributions:fix/buildpacks-position

Conversation

@serdarozerr

@serdarozerr serdarozerr commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Concurrent PATCH /v3/buildpacks/:guid position changes could leave the list with a duplicate position and an adjacent gap. The buildpack is loaded before the lock, so move_to computed its shift range from a stale in-memory position. Fixed by calling buildpack.refresh under the lock. Added a deterministic regression test (fails without the fix, passes with it)

  • 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

This branch has not been deployed

No deployments
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