-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support renaming stack projects #3292
Conversation
pkg/backend/httpstate/backend.go
Outdated
|
||
// Transferring stack ownership is available to Pulumi admins, but isn't quite ready | ||
// for general use yet. Will ship sometime in Q4'2019. | ||
// TODO[pulumi-service#2224]: UI support for moving stacks between organizations |
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.
This links to a private repository--are we OK with having links and comments like this in the code?
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 we could reasonably decide going either way on this. So I could take it or leave it. I erred on the side of adding it just to provide a little more transparency. e.g. "This isn't supported yet" vs. "Sometime in Q4" vs. "Here is the issue (that you probably cannot see), but no seriously, we're working on 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.
I think we should definitely remove the date. If it were me, I'd remove the issue link as well, but I don't feel that strongly.
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.
Sounds good to me, will remove the date and issue link.
"back to its previous name.", | ||
"back to its previous name." + | ||
"\n" + | ||
"You can also rename the stack's project by passing a fully-qualified stack name as well. For example:\n" + |
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.
Does it make sense to also mention here you cannot update the organization?
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'm inclined to leave as-is not mentioning the "cannot transfer ownership via rename", as it is probably just going to confuse readers. (Who are interested in understanding stack rename
and not looking for stack transfer
or some other command.)
The error message a user gets if they do try to "transfer via rename" should be 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 -- although I am wondering do we have some sort of integration tests here?
Add CLI support for renaming stack projects.
The first PR, #3273, added the API types. Now that the Pulumi Service has been updated to support the functionality, this commit adds the CLI-side.
pulumi stack rename
, when using the HTTP backend, will now accept a fully-qualified stack name. This allows you to rename the stack's project on the Pulumi Service safely.In practice, you will need to pair this with a change to the
Pulumi.yaml
file. So the experience of project renaming will always be a bit clunky. But by adding this support it is at least possible.