Skip to content

Add missing STOPPING state to v3 ProcessState (5.x.x backport) - #1396

Open
pboehm90 wants to merge 1 commit into
cloudfoundry:5.x.xfrom
pboehm90:fix/add-process-state-stopping-5.x
Open

pboehm90 wants to merge 1 commit into
cloudfoundry:5.x.xfrom
pboehm90:fix/add-process-state-stopping-5.x

Conversation

@pboehm90

@pboehm90 pboehm90 commented Nov 5, 2026

Copy link
Copy Markdown

Backport of #1382 to 5.x.x, as requested in the review there.

Problem

The Cloud Controller v3 API documents the following values for the state field of the
process stats object:
RUNNING, CRASHED, STARTING, STOPPING, DOWN.

ProcessState currently does not include STOPPING. If an instance is shutting down while the
stats are requested (for example during a restart or a rolling deployment),
ProcessState.from("STOPPING") throws an IllegalArgumentException and the whole
GET /v3/processes/:guid/stats response cannot be deserialized.

Changes

Same change as in #1382, cherry-picked without conflicts:

  • Add STOPPING to ProcessState. The new value is appended at the end, so the ordinals of the
    existing values (used for comparison in DefaultApplications) stay unchanged.
  • Add a test in ReactorProcessesTest with a stats fixture that contains a STOPPING instance.

Testing

  • ./mvnw spotless:check passes.
  • ./mvnw clean package passes locally on the 5.x.x branch (JDK 21).

The Cloud Controller v3 API documents STOPPING as a valid state of a
process instance. Without it, deserializing process stats fails while an
instance is shutting down.

Backport of cloudfoundry#1382 to 5.x.x.

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