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

state delete: fix panic when there are no snapshots #15045

Merged
merged 1 commit into from Jan 4, 2024

Conversation

tgummerer
Copy link
Collaborator

Currently when there are no snapshots, and a user calls pulumi state delete without specifying a URN, and no snapshot available, it panics. Fix this panic, and give the user better error message in this case.

Fixes #15033

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

Currently when there are no snapshots, and a user calls `pulumi state
delete` without specifying a URN, and no snapshot available, it
panics.  Fix this panic, and give the user better error message in
this case.
@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2024-01-04)

Bug Fixes

  • [cli/state] Fix a panic in pulumi state when no snapshots are available
    #15045

@tgummerer tgummerer requested a review from a team January 4, 2024 12:45
@tgummerer tgummerer added this pull request to the merge queue Jan 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 4, 2024
@tgummerer tgummerer added this pull request to the merge queue Jan 4, 2024
Merged via the queue into master with commit ef3ff1a Jan 4, 2024
46 checks passed
@tgummerer tgummerer deleted the tg/panic-15033-fix branch January 4, 2024 17:49
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2024
### Features

- [cli] Adds a flag that allows inserting a fragment into the dot file
when generating a graph. This can be used for styling the graph
elements, setting properties etc.


### Bug Fixes

- [sdkgen/go] Revert using plain object type when the plainness is
shallow and we should use inputty-types instead
  [#15059](#15059)

- [cli/state] Fix a panic in pulumi state when no snapshots are
available
  [#15045](#15045)

- [sdkgen/python] Fixes resource imports when importing across different
modules
  [#14832](#14832)


### Miscellaneous

- [backend/filestate] Upgrade gocloud.dev to the latest version
  [#15011](#15011)
@justinvp justinvp mentioned this pull request Jan 9, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2024
### Features

- [cli] Adds a flag that allows inserting a fragment into the dot file
when generating a graph. This can be used for styling the graph
elements, setting properties etc.
  [#14858](#14858)


### Bug Fixes

- [engine] Fix an uncommon datarace with replace steps.

- [sdkgen/go] Revert using plain object type when the plainness is
shallow and we should use inputty-types instead
  [#15059](#15059)

- [cli/state] Fix a panic in pulumi state when no snapshots are
available
  [#15045](#15045)

- [sdkgen/python] Fixes resource imports when importing across different
modules
  [#14832](#14832)


### Miscellaneous

- [backend/filestate] Upgrade gocloud.dev to the latest version
  [#15011](#15011)
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.

runtime error: invalid memory address or nil pointer dereference
3 participants