From 06ccf0ba347cbeef7e9b1cc8b115de1adb781590 Mon Sep 17 00:00:00 2001 From: Florian Braun <5863788+FloThinksPi@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:22:35 +0100 Subject: [PATCH] Enhance stack handling with state_reason field Leverage an additional 'state_reason' field for better communication in warning and error messages related to stack states. Found out its needed in implementation see https://github.com/cloudfoundry/cloud_controller_ng/pull/4712 --- toc/rfc/rfc-0045-enhance-stack-handling.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/toc/rfc/rfc-0045-enhance-stack-handling.md b/toc/rfc/rfc-0045-enhance-stack-handling.md index cb31d19b6..ee46a796e 100644 --- a/toc/rfc/rfc-0045-enhance-stack-handling.md +++ b/toc/rfc/rfc-0045-enhance-stack-handling.md @@ -127,20 +127,18 @@ The `state` of the stack will directly influence the behavior of the CF API: - If the state is `RESTRICTED`, staging a *new* application will fail with an error. - If the state is `DISABLED`, staging or restaging *any* application will fail with an error. -To improve communication with developers, the existing `description` field of a stack will be leveraged. The content of the `description` field should be included in any warning or error message related to the stack's state. This allows operators to provide context, migration guides, or links to further documentation. +To improve communication with developers, an additional field e.g `state_reason` of a stack object should be leveraged. The content of the `state_reason` field should be included in any warning or error message related to the stack's state. This allows operators to provide context, migration guides, or links to further documentation. For example, a deprecation warning could look like this: ``` -WARNING: The stack 'cflinuxfs3' is DEPRECATED and will be removed in the future. -Description: This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: . +WARNING: The stack 'cflinuxfs3' is DEPRECATED and will be removed in the future: "This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: ." ``` And an error message for a disabled stack: ``` -ERROR: Staging failed. The stack 'cflinuxfs3' is DISABLED and can no longer be used for staging. -Description: This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: . +ERROR: Staging failed. The stack 'cflinuxfs3' is DISABLED and can no longer be used for staging:"This stack is based on Ubuntu 18.04, which is no longer supported. Please migrate your applications to 'cflinuxfs4'. For more information, see: ." ``` This approach provides a clear and explicit way for operators to manage the lifecycle of stacks and communicate changes to users effectively.