fix(cas-backend): Rotate credentials does not remove default flag#2417
Merged
javirln merged 1 commit intochainloop-dev:mainfrom Sep 4, 2025
Merged
Conversation
Signed-off-by: Javier Rodriguez <javier@chainloop.dev>
6e12275 to
c461da5
Compare
jiparis
approved these changes
Sep 4, 2025
Piskoo
approved these changes
Sep 4, 2025
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.
This pull request refactors how the CLI handles updates to CAS Backend resources, specifically for the
descriptionanddefaultfields. The main improvement is to only update these fields if the user explicitly sets the corresponding flags, preventing accidental overwrites with zero values.CLI update logic improvements:
isDefaultCASBackendUpdateOption,descriptionCASBackendUpdateOption) and helper functions (captureUpdateFlags,handleDefaultUpdateConfirmation) to ensure updates only occur when flags are explicitly set, and to centralize confirmation prompts for default backend changes. [1] [2]azure-blob,inline,oci,aws-s3) to use the new flag capture and confirmation logic, and to pass pointer values to update options. [1] [2] [3] [4]Internal types and API updates:
NewCASBackendUpdateOptsstruct fieldsDescriptionandDefaultto pointers, so unset fields are distinguishable from zero values.CASBackendServiceUpdateRequestprotobuf struct and its getter methods to use pointer types forDescriptionandDefault, supporting the new semantics in API requests. [1] [2] [3]