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

improvement(pulumi): improve preview output #3096

Merged
merged 7 commits into from
Oct 21, 2022

Conversation

thsig
Copy link
Collaborator

@thsig thsig commented Aug 5, 2022

What this PR does / why we need it:

We now only show the output of pulumi preview when the generated plan is not a no-op. This makes the output much easier to parse visually during a manual review process.

We now also copy plans that aren't no-ops to a subdirectory of the preview directory for easier review and deployment, and write a total summary of the generated plans (including preview links and operation counts by affected service, and total counts).

The latter is designed to be useful for further automation, e.g. in a CI/CD context.

@thsig thsig force-pushed the improved-pulumi-preview-summary branch from 7afcf2a to 2a560e4 Compare September 22, 2022 18:58
@thsig thsig force-pushed the improved-pulumi-preview-summary branch 2 times, most recently from baefea6 to 475862e Compare October 4, 2022 15:09
thsig added 7 commits October 19, 2022 12:48
We now only show the output of `pulumi preview` when the generated plan
is not a no-op. This makes the output much easier to parse visually
during a manual review process.

We now also copy plans that aren't no-ops to a subdirectory of the preview
directory for easier review and deployment.
The script was missing the ARM64 binary from the list.
We now include build tasks in the list of dependencies for plugin tasks
for the Pulumi plugin.

This ensures that e.g. any required `exec` build steps are run ahead of
deployments if needed.
We now generate a total summary of a plan run when running `garden
plugins pulumi preview`, which includes preview links, step/operation
counts (and more) for each pulumi service affected by the plan.

The total summary also includes top-level step counts by operation type
(across all affected services).

This plan is written to a `plan-summary.json` file inside the
`.garden/pulumi.outputs/last-preview` directory.

This file is designed to be useful for further automation, e.g. in a
CI/CD context.
This fixes an oversight in the logic around Pulumi plugin commands where
we forgot to create a new plugin context with a template context
specific to the module being processed by Pulumi plugin commands.
Added a `--skip-dependencies` CLI option for all Pulumi plugin commands.
This option works similarly as in the `deploy` command.
@thsig thsig force-pushed the improved-pulumi-preview-summary branch from 475862e to 7ca5f52 Compare October 19, 2022 22:48
@thsig thsig marked this pull request as ready for review October 20, 2022 00:01
Copy link
Collaborator

@vvagaytsev vvagaytsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@thsig thsig merged commit 6d87f3c into main Oct 21, 2022
@thsig thsig deleted the improved-pulumi-preview-summary branch October 21, 2022 00:07
vvagaytsev added a commit that referenced this pull request Jun 25, 2024
…ommand

The flag was implemented in #3096.
The logic that respects the flag was removed in e54d1b5,
likely by accident.
This commit restores the logic that prevents dependency resolution if the corresponding flag is set.
github-merge-queue bot pushed a commit that referenced this pull request Jun 25, 2024
…6226)

fix(pulumi): respect `--skip-dependencies` flag in `pulumi preview` command

The flag was implemented in #3096.
The logic that respects the flag was removed in e54d1b5,
likely by accident.
This commit restores the logic that prevents dependency resolution if the corresponding flag is set.
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.

3 participants