Skip to content
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

Merged
merged 3 commits into from
Oct 3, 2019
Merged

Conversation

chrsmith
Copy link
Contributor

@chrsmith chrsmith commented Oct 2, 2019

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.


// 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
Copy link
Member

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?

Copy link
Contributor Author

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".

Copy link
Member

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.

Copy link
Contributor Author

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" +
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@ekrengel ekrengel left a 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?

@chrsmith chrsmith merged commit 97d7690 into master Oct 3, 2019
@pulumi-bot pulumi-bot deleted the chrsmith/support-project-rename_ii branch October 3, 2019 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants