Add async recursive delete for apps and service instances - #5299
Merged
Conversation
johha
force-pushed
the
recursive-app-service-delete
branch
9 times, most recently
from
July 22, 2026 15:45
a87ea6c to
05ca1aa
Compare
philippthun
reviewed
Aug 3, 2026
philippthun
reviewed
Aug 4, 2026
johha
force-pushed
the
recursive-app-service-delete
branch
3 times, most recently
from
August 10, 2026 07:30
2ab4ea5 to
3b0b8fa
Compare
Behind `temporary_enable_async_recursive_delete` flag (default off). Recursive delete jobs re-enqueue instead of failing when sub-resources (service bindings) are deleted asynchronously, waiting for them to settle and surfacing the original broker error on failure. Adds root/sub job tracking via `root_job_guid` on the jobs table. Foundation for future recursive deletes (org, space). - Introduce RecursiveDeleteRootJobMixin encapsulating the root-job lifecycle: defer-while-sub-jobs-in-flight, raise-if-failed, and root-context activation; keep sub_jobs_in_flight? side-effect-free. - Override the max-duration budget for root jobs: never expire while sub-jobs are still deleting (each sub-job is self-bounded), and re-anchor the budget to when the sub-jobs completed so the root's own broker delete gets its full duration. Implemented by overriding start_time in the mixin. - Pace the root's re-enqueue off the slowest active sub-job's next run so it never wakes early. - Surface sub-resource failures via rescue (log_immediate / compound_error) rather than looping over sub_resource_errors. - Add ServiceInstance#route_bindings association. - Enqueuer exposes current_root_job_guid, overridden by GenericEnqueuer.
johha
force-pushed
the
recursive-app-service-delete
branch
from
August 11, 2026 14:02
566d580 to
d2f62a2
Compare
johha
marked this pull request as ready for review
August 11, 2026 14:03
philippthun
approved these changes
Aug 11, 2026
3 tasks
ari-wg-gitbot
added a commit
to cloudfoundry/capi-release
that referenced
this pull request
Aug 11, 2026
Changes in cloud_controller_ng:
- Add async recursive delete for apps and service instances
PR: cloudfoundry/cloud_controller_ng#5299
Author: Johannes Haass <johannes.haass@sap.com>
This was referenced Aug 11, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Behind
temporary_enable_async_recursive_delete flag(default off). Recursive delete jobs re-enqueue instead of failing when sub-resources (service bindings) are deleted asynchronously, waiting for them to settle and surfacing the original broker error on failure. Adds root/sub job tracking viaroot_job_guidon the jobs table. Foundation for future recursive deletes (org, space).Thanks for contributing to cloud_controller_ng. To speed up the process of reviewing your pull request please provide us with:
Links to any other associated PRs
Add feature flags for async recursive delete for SI and apps capi-release#677
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests