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

fix a panic when refresh is used with --continue-on-error #16184

Merged
merged 3 commits into from
May 13, 2024

Conversation

tgummerer
Copy link
Collaborator

Refreshes have their own way of dealing with errors, which does not match what we want to do with ContinueOnError (it's further reaching, we still want to refresh dependents of failed resources). Therefore we made them mutually exclusive.

The original change however missed that it's also possible for refreshes to happen during pulumi up using the --refresh flag. This currently results in an assert/panic.

Fix this by not passing the ContinueOnError option through when we have a refresh. This still gives us the right behaviour since refresh ignores the errors anyway.

Fixes #16177

Checklist

  • I have run make tidy to update any new dependencies
  • I have run make lint to verify my code passes the lint check
    • I have formatted my code using gofumpt
  • I have added tests that prove my fix is effective or that my feature works
  • I have run make changelog and committed the changelog/pending/<file> documenting my change
  • Yes, there are changes in this PR that warrants bumping the Pulumi Cloud API version

Refreshes have their own way of dealing with errors, which does not
match what we want to do with ContinueOnError (it's further reaching,
we still want to refresh dependents of failed resources).  Therefore
we made them mutually exclusive.

The original change however missed that it's also possible for
refreshes to happen during `pulumi up` using the `--refresh` flag.
This currently results in an assert/panic.

Fix this by not passing the `ContinueOnError` option through when we
have a refresh.  This still gives us the right behaviour since refresh
ignores the errors anyway.
@tgummerer tgummerer requested a review from a team as a code owner May 13, 2024 09:46
@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2024-05-13)

Bug Fixes

  • [engine] Fix panic when using pulumi up --refresh --continue-on-error
    #16184

@tgummerer tgummerer enabled auto-merge May 13, 2024 10:10
@tgummerer tgummerer added this pull request to the merge queue May 13, 2024
@tgummerer tgummerer removed this pull request from the merge queue due to a manual request May 13, 2024
@tgummerer tgummerer enabled auto-merge May 13, 2024 11:21
@tgummerer tgummerer added this pull request to the merge queue May 13, 2024
Merged via the queue into master with commit dacabae May 13, 2024
49 checks passed
@tgummerer tgummerer deleted the tg/continue-on-error-refresh branch May 13, 2024 12:42
@justinvp justinvp mentioned this pull request May 14, 2024
github-merge-queue bot pushed a commit that referenced this pull request May 15, 2024
### Features

- [docs] Resource docs: bump the number of displayed supporting types
from 200 to 1000 by default
  [#16185](#16185)

- [sdk/go] Prefer pluginDownloadURLOverrides over PluginDownloadURL
specified in the package
  [#16186](#16186)


### Bug Fixes

- [engine] Fix panic when using `pulumi up --refresh
--continue-on-error`
  [#16184](#16184)
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.

panic: fatal: An assertion has failed: ignoreErrors and ContinueOnError are mutually exclusive
3 participants