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

"preview" and "up" commands always show unchanged resources without an option to disable that #463

Open
ekini opened this issue Dec 16, 2021 · 2 comments
Labels
kind/enhancement Improvements or new features

Comments

@ekini
Copy link

ekini commented Dec 16, 2021

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

The actions output is quite spammy if you have many resources in the stack, because all of them are shown in the output.
It would be useful to have an option to match the behaviour to the usual "pulumi preview" command, which only shows the changes.

Steps to reproduce

  1. Use the actions with many resources
  2. We've got 200 resources and it's hard to understand what's actually changing.

Expected: compact output
Actual: spammy output

Extra details

I tried to figure it out myself, and it seems like:

  1. Actions use pulumi automation SDK, which itself uses the Pulumi CLI.
  2. Pulumi CLI always shows spammy output in non-interactive mode.
  3. Interactive mode is determined here https://github.com/pulumi/pulumi/blob/4da051a79966673f58d8ca955d69e72a89a71aec/sdk/go/common/util/cmdutil/console.go#L48
  4. My thinking was to try and make it "interactive" with "--yes" flag/parameter passed. Should theoretically work with PULUMI_DISABLE_CI_DETECTION=true PULUMI_SKIP_CONFIRMATIONS=true pulumi preview in Actions, right?
  5. However, the SDK pipes Pulumi CLI output (checked with https://github.com/pulumi/pulumi/blob/2f433d64b73f270b4d56ccb7b566dc14d0d41d2b/sdk/python/lib/pulumi/automation/_cmd.py#L52 , presumably SDKs for other languages do the same) so it won't even work as per https://github.com/pulumi/pulumi/blob/4da051a79966673f58d8ca955d69e72a89a71aec/sdk/go/common/util/cmdutil/console.go#L62
@ekini ekini added the kind/bug Some behavior is incorrect or out of spec label Dec 16, 2021
@leezen
Copy link
Contributor

leezen commented Dec 18, 2021

Do either the diff (which will affect output) or comment-on-pr (which will post to your PR) options provide what you need here?

@leezen leezen added kind/bug Some behavior is incorrect or out of spec kind/enhancement Improvements or new features and removed kind/bug Some behavior is incorrect or out of spec labels Dec 18, 2021
@ekini
Copy link
Author

ekini commented Dec 29, 2021

Thank you, the diff option did make it better! When I was reading the docs it didn't seem to give me less output with diff enabled.

comment-on-pr was already enabled, but was still hard to parse through ~200 lines.
Still, would be nice to have an option to have --show-sames disabled.

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
Projects
None yet
Development

No branches or pull requests

2 participants