-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: clean up deployer db resources, delete after sync to r-r, delete secrets command #1376
Conversation
f32fe97
to
c1abbe3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested it through an update of Shuttle ? Deploy on the current stable version, have some secrets, then upgrade (while keeping the deployer
on the previous version, which is a common case), and checked what happens ?
@@ -119,12 +119,6 @@ pub enum Command { | |||
/// Manage resources of a Shuttle project | |||
#[command(subcommand)] | |||
Resource(ResourceCommand), | |||
/// Manage secrets for this Shuttle service | |||
Secrets { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion(non-blocking): And actually, are we sure we want to remove this command ? I know we're treating secrets as a resources now, but isn't that an implementation detail ? We could instead ask the r-r for just the secrets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could do that, yeah. I think it's more clear if they are only in one place where they currently logically belong. This command has been broken for quite some time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is worth simplifying this and removing the cmd, given the costs coming from maintaining, bugs fixing, and the support specifically for this cmd (and maybe feature requests?).
However, it is worth saying we remove it without a deprecation notice, and backward compat support e.g. previous versions of cargo-shuttle
can call secrets
cmd on a recent deployer, and I think it will fail, right? We would need to instruct users to use resource list
instead, which shouldn't be that bad.
Also, it is worth saying secret retrieval is not extremely useful, given we're not displaying the actual values, so having a dedicated command just for them doesn't make sense to me. Down the line, secrets displaying (along other resources displaying) should be further refined to maybe display hints and data about when it was last modified (and possibly accessed?), but still, not sure if it is worth a dedicated cmd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me like the command is currently broken, like Johan mentioned, so I think we can safely remove it. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea was more to keep the secrets
part but in a workable state :p But fine if you think resources make more sense :)
My test with inserting an old record mimics the upgrade from an old version (based on what I observed during support week). I would have to go back several months to do it "naturally". To me, this is sufficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🥳 ! Super happy about the simplifications, good job
Description of change
secrets
CLI command since it only targeted the deployer cache. The new way is to useresource list
How has this been tested? (if applicable)
Tested with inserting a resource in deployer, and the resource list operation correctly synced them up to r-r. The project could then be deleted without hassle.