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 Update Plans #991

Closed
dmizelle opened this issue Jul 18, 2023 · 0 comments · Fixed by #994
Closed

Support Update Plans #991

dmizelle opened this issue Jul 18, 2023 · 0 comments · Fixed by #994
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed

Comments

@dmizelle
Copy link
Contributor

Hello!

  • Vote on this issue by adding a 👍 reaction
  • If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Issue details

As part of our pipeline, we do the following:

  • Run unit tests against our codebase
  • Do a Pulumi Preview, which then someone reviews, approves, and then the author merges.

On merge (push) we then run the pipeline without tests and up instead of preview.

This presents a problem: What the reviewer signed off on is not guaranteed to be what actually gets deployed. If the preview showing as a PR comment is a few hours old, and someone has found a way to "clickops" something, Pulumi has the potential to undo said change (which tbh is okay.) In the worst case, it does something completely different altogether than what has been planned.

Pulumi appears to have solved this with the public preview of "Update Plans" but this functionality is not exposed via the Github Action.

I'd like to add this functionality to the GitHub action via adding plan to config.options.

Affected area/feature

Affected area would be the Github Actions repository. Would need changes to config.ts, main.ts, some tests, README.md, and the examples directory to give users a good example.

@dmizelle dmizelle added kind/enhancement Improvements or new features needs-triage Needs attention from the triage team labels Jul 18, 2023
@dmizelle dmizelle changed the title Support Update PLans Support Update Plans Jul 18, 2023
dmizelle-humane pushed a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
  - Some of the jobs that use Windows did not have a `shell` set, so it
    was failing to retrieve the NPM cache. This is out of scope for this
    PR, but it was failing on my repo's testing.
dmizelle-humane pushed a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
dmizelle-humane pushed a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
dmizelle-humane pushed a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
dmizelle added a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
dmizelle added a commit to dmizelle/pulumi-actions that referenced this issue Jul 18, 2023
Related to / resolves pulumi#991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
@Frassle Frassle removed the needs-triage Needs attention from the triage team label Jul 21, 2023
justinvp pushed a commit that referenced this issue Jul 24, 2023
Related to / resolves #991

This commit does the following:
- Updates `src/config.ts` to expose the `plan` option
- Updates the `README.md` to reflect that this option is now
  available.
- Adds a new test that will do a `preview`, save the plan, and then
  attempt to `up` using the plan.
- Update `action.yml` to reflect this new option
- `.github/workflows/workflow.yml`:
  - Adds new steps to each job for generating an Update Plan and
    ensuring that the file has content when testing `preview`
@pulumi-bot pulumi-bot added the resolution/fixed This issue was fixed label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants