Skip to content

Allow stack description update - #5596

Draft
kathap wants to merge 3 commits into
mainfrom
allow-stack-description-update
Draft

kathap wants to merge 3 commits into
mainfrom
allow-stack-description-update

Conversation

@kathap

@kathap kathap commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Allow updating stack description via PATCH /v3/stacks/:guid

  • A short explanation of the proposed change:
    Adds an optional description parameter to PATCH /v3/stacks/:guid, making a stack's description editable after creation (previously it was immutable, v2 had no stack update endpoint at all, and v3 only allowed updating state, state_reason, and metadata). When provided, description must be non-empty and at most 250 characters. The create endpoint's validation was tightened to the same rule so POST and PATCH behave identically. The V3 API docs and OpenAPI spec were updated accordingly.
  • An explanation of the use cases your change solves
    Mark a newly introduced stack as "preview" (the originating request, NGPBUG-512478). When a new stack is rolled out, operators want to flag it as preview/experimental for a period. The description is prominent, it's shown by cf stacks, so updating it is a clear, visible signal to users. (state_reason could carry this too, but it's less visible and not shown by cf stacks.)
    Correct or clarify a stack description after the fact without recreating the stack, e.g. fixing a typo, updating the OS version note, or adding deprecation guidance, rather than being stuck with whatever was seeded from cf-deployment at creation time.

This change was developed with AI assistance; all code was reviewed and tested by me.

  • 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 adds an optional `description` parameter
to PATCH /v3/stacks/:guid so a stack's description can be changed after
creation — e.g. to mark a newly introduced stack as "preview".

Validation: when provided, description must be non-empty and <= 250
characters. The create message is tightened to match,
POST and PATCH now behave identically for description:
  - Omitted → allowed (comes from cf-deployment)
  - Non-empty, ≤250 → allowed
  - "", whitespace-only, or null → 422 rejected
  - >250 → rejected
@kathap
kathap marked this pull request as draft October 30, 2026 08:51
@kathap
kathap force-pushed the allow-stack-description-update branch from 5f58bfc to 8a79f29 Compare October 30, 2026 11:21

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