Skip to content

Add nil guard to ProcessModel.run_action_user#4879

Merged
jochenehret merged 1 commit intomainfrom
prevent_app_nil_error
Feb 27, 2026
Merged

Add nil guard to ProcessModel.run_action_user#4879
jochenehret merged 1 commit intomainfrom
prevent_app_nil_error

Conversation

@jochenehret
Copy link
Contributor

@jochenehret jochenehret commented Feb 25, 2026

  • A short explanation of the proposed change:
    Nil guard prevents exceptions "docker? delegated to app, but app is nil" when listing large number of processes on a live system. The exception can happen if ProcessModel objects are processed while the associated app is being deleted.

  • An explanation of the use cases your change solves
    Make sure that calling /v3/processes on a live system does not result in sporadic "UnknownError"s.

  • 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

@jochenehret jochenehret force-pushed the prevent_app_nil_error branch from a607fde to 0faaa76 Compare February 25, 2026 12:08
@jochenehret jochenehret requested a review from a team February 25, 2026 12:36
* prevents exceptions "docker? delegated to app, but app is nil" when listing large number of processes on a live system
@jochenehret jochenehret force-pushed the prevent_app_nil_error branch from 0faaa76 to 55b1c14 Compare February 26, 2026 12:59
@philippthun
Copy link
Member

When apps are eager loaded (see #4889), this should not happen anymore. But as the other PR needs some additional testing, this one should be merged as a quick fix.

@jochenehret jochenehret merged commit 4fc12c8 into main Feb 27, 2026
11 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Feb 27, 2026
Changes in cloud_controller_ng:

- Add nil guard to ProcessModel.run_action_user
    PR: cloudfoundry/cloud_controller_ng#4879
    Author: Jochen Ehret <jochen.ehret@sap.com>
@moleske moleske deleted the prevent_app_nil_error branch February 27, 2026 16:08
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.

2 participants