Conversation
Changing only a secret's type enabled Deploy, but the banner read "0 undeployed changes" and the preview listed nothing, because getChanges() never compared the type. Type changes are now counted and shown as a TYPE line with the old and new type.
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.
🔍 Overview
Changing only a secret's type in an environment's secrets view (for example Secret → Config, or → Sealed) enables Deploy, but the banner reads "0 undeployed changes. Click to preview" and the preview is empty.
getChanges()inDeployPreview.tsxcompared key, value, comment and tags, but never the type, sochangeCount()returned 0. The page'sunsavedChangescheck and the deploy mutation already include the type.💡 Proposed Changes
getChanges()now compares the secret'stypeand counts a type change like any other field edit.TYPE:line with the old type struck through and the new type, placed afterKEY:, in the same order as the secret history view. The change is stored assecretType, becauseSecretChange.typealready holds the kind of change (Added or Modified).SECRET_TYPESinTypeSelector.tsx, which is now exported, so the preview uses the same words as the selector.🖼️ Screenshots or Demo
A type-only edit now shows "1 undeployed change. Click to preview", and the preview lists
Updated API_URLwithTYPE: ~~Secret~~ Config.📝 Release Notes
🧪 Testing
tests/components/environments/secrets/DeployPreview.test.tsxcovers a type-only edit, a type change combined with a value change, and a value change on a saved Sealed secret. The first two fail onmainwith "0 undeployed changes. Click to preview".yarn testandyarn lintpass.