-
Notifications
You must be signed in to change notification settings - Fork 73
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
Refresh preview option #870
Comments
Hi. That's an interesting idea. I'm not too familiar with the actions side of things, but from https://github.com/pulumi/actions#configuration it seems like the following would accomplish what you're asking. - uses: pulumi/actions@v4
with:
command: preview
refresh: true
... If you need something more than that from the action, can you explain further what you might need? |
Hi, there is a subtle difference there. |
Hello, we would also like an option to perform a preview with a refresh without updating the stack, although our use case is a little different. We run pulumi previews as part of our CI checks, however because the refresh option updates the stack, if multiple PRs are opened or updated at around the same time, one of the PR checks will fail as only one update can be performed on a stack at a time and requiring us to rerun it manually. Having the refresh run without updating the stack would solve this issue for us. We have raised this issue with @aureq privately already. I saw @RobbieMcKinstry has commented in another issue about adding an option for |
Hi Peter (@peterstockwell-sagov),
When I read this, my mind lept to GitHub Action's I think @michal-bajer1 identified some very confusing behavior. It's confusing (to me) that… - uses: pulumi/actions@v4
command: preview
refresh: true …runs… $ pulumi refresh; pulumi preview instead of... $ pulumi preview --refresh If I had wanted the chaining behavior, I would have thought we'd chain the operations in the YAML instead: - uses: pulumi/actions@v4
command: refresh
- uses: pulumi/actions@v4
command: preview This is made even more confusing by pulumi/pulumi#10967 Unfortunately, I don't think we have a way to repair this behavior without redefining the behavior of |
@RobbieMcKinstry It definitely confused me at first :) I guess you could try to introduce something like:
But it isn't pretty :( |
If I weren't worried about breaking changes, I would prefer to just drop the But you're right, that's an approach that would clarify the behavior without a breaking change :) |
As there is no way to get the Automation API to run Our intention was back then to do the I would love to see an idea for implementing |
That makes sense! However, I think we could fix that problem ;D If we add the |
I opened pulumi/pulumi#12740 to address the missing flag in Automation API. |
12743: Node AutoAPI: Support `preview --refresh` r=RobbieMcKinstry a=RobbieMcKinstry <!--- Thanks so much for your contribution! If this is your first time contributing, please ensure that you have read the [CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md) documentation. --> # Description <!--- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. --> This PR adds support for `pulumi preview --refresh` in Automation API for NodeJS. Fixes #12740 This is a blocker for [actions/#870](pulumi/actions#870) and potential customer adoption. ## Checklist <!--- Please provide details if the checkbox below is to be left unchecked. --> - [x] I have added tests that prove my fix is effective or that my feature works <!--- User-facing changes require a CHANGELOG entry. --> - [x] I have run `make changelog` and committed the `changelog/pending/<file>` documenting my change <!-- If the change(s) in this PR is a modification of an existing call to the Pulumi Cloud, then the service should honor older versions of the CLI where this change would not exist. You must then bump the API version in /pkg/backend/httpstate/client/api.go, as well as add it to the service. --> - [ ] Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version <!-- `@Pulumi` employees: If yes, you must submit corresponding changes in the service repo. --> Co-authored-by: Robbie McKinstry <[email protected]> Co-authored-by: Robbie McKinstry <[email protected]>
Any update to this? Would definitely like to see the same, and it seems like the pull request is merged now 🙏 |
Hi @arealmaas. Thanks for reaching out and expressing your interest ❤️ |
Hello 👋 I will have a look into this very soon! 🚀 |
Is this still on the roadmap/happening very soon? |
Took an initial stab at this in #1118 without knowing what I'm doing. In a future major release it might make sense to change the behavior of the |
Hi. I have run into this issue as well. Essentially I want to warn my users if the stack is out of sync with my cloud provider, but I don't actually want to update the stack. All I want to happen is to be notified that some drift has occurred. Essentially I want to be able to run:
And have the output of that command as an output of the action. My ideal solution would be to add a new input: Otherwise an input with:
command: refresh
extraArgs: --preview-only |
Hello!
Issue details
I would like to build a Github workflow, which would regularly run preview of stack refresh and create an issue in the repository, if some changes between stack and our cloud provider are found.
Affected area/feature
The options of the refresh or preview command, so that the equivalent of
pulumi preview --refresh
can be executed.The text was updated successfully, but these errors were encountered: