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

Add support for Review Pulumi Stacks #9

Closed
ziahamza opened this issue Feb 16, 2019 · 3 comments · Fixed by #118
Closed

Add support for Review Pulumi Stacks #9

ziahamza opened this issue Feb 16, 2019 · 3 comments · Fixed by #118
Labels
resolution/fixed This issue was fixed

Comments

@ziahamza
Copy link

Allow the ability for Pulumi stack to be automatically created / destroyed with each PR. This would be a super cool feature to dynamically test preview links for infrastructure changes without having to merge to staging branch.

@ziahamza
Copy link
Author

More than happy to send a series of PRs, with this being the first: #8

@chrsmith
Copy link
Contributor

Hey @ziahamza , sorry for the delay in getting to this! It's been snowing in Seattle, which evidently means that my entire life has been chaos. I'll take a look at the PR you linked.

As for this particular issue, and dynamically standing up Pulumi stacks for review, it's an interesting idea to be sure. I'd defer to @lukehoban or @d-nishi on how we would want to prioritizing adding such a capability.

I can definitely see us adding support or a hook so that you could dynamically create a new stack and run pulumi update when CI/CD runs for a pull request. But the problem I see is that we'd need to be careful in understanding the lifetime of cloud resources associated with that stack.

Today, most CI/CD systems we support don't have a good story for hooking into the "pull request closed" type event. Pulumi's GitHub app doesn't control the execution environment, rather, the user-provided CI/CD system does. In other words, Pulumi doesn't initiate the stack update, it's up to how TravisCI, CircleCI, or GitHub actions were configured.

So in order for this scenario to work, the repo's GitHub actions would need to explicitly register an event for the pull_request event's "closed" action, and then start the workflow to destroy the PR-specific stack... which is probably doable.

If you are eager to work on this scenario, I'd suggest just forking this repo and seeing if you can hack together the complete end-to-end experience. Starting from that we can see what we can simplify and if the net-result is something that would work in-practice. And if not, understand what feature(s) we would need to add to the CLI or Pulumi Service to make it work.

@stack72
Copy link
Contributor

stack72 commented Dec 31, 2020

Closed as being tracked in #40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants