You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep Connect Cloud secrets on redeploy with -E - #913
Deploying to Posit Connect Cloud with -E deleted every secret that -E did not name, including secrets added in the Connect Cloud UI. This happened because PATCH /contents/{id} replaces the whole secret set.
Now, when the content already exists, prepare_deploy() also sends the content's other secrets with a None value, which keeps them. Deploys without -E, and creating new content, are unchanged.
This happened because PATCH /contents/{id} replaces the whole secret set
That doesn't sound like PATCH semantics to me, sounds more like a PUT. Are you sure the fix for this isn't on the server side?
It's a PATCH of content, so replacing the array value of secrets seems semantically OK. But I think there's a server-side change that means we don't need to change these clients at all: keep any secret that isn't named in the list, and add an explicit way to delete one. We'd have to coordinate the API change with the UI, which deletes by leaving secrets out today.
It would change PATCH for API callers that delete secrets by leaving them out; their deletes would stop working. We can check our logs to see whether anyone besides the UI and the deploy clients does that.
I approved this PR, but I changed my mind; Neal has convinced me :)
Agreed. We're changing the Connect Cloud API so that PATCH keeps any secret that isn't in the list, with a separate endpoint for deleting secrets. That fixes released clients without an upgrade, so I'm closing this PR.
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
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.
Deploying to Posit Connect Cloud with
-Edeleted every secret that-Edid not name, including secrets added in the Connect Cloud UI. This happened becausePATCH /contents/{id}replaces the whole secret set.Now, when the content already exists,
prepare_deploy()also sends the content's other secrets with aNonevalue, which keeps them. Deploys without-E, and creating new content, are unchanged.