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 TestDestroySetsEncryptionsalt test and resulting bug #15432

Merged
merged 4 commits into from
Feb 15, 2024

Conversation

Frassle
Copy link
Member

@Frassle Frassle commented Feb 14, 2024

Description

While working on some other secret manager changes I found that TestDestroySetsEncryptedkey wasn't actually fully testing what we thought it was.

Firstly it was a bad name, we're checking for encryptionsalt being set not encryptedkey. But more importantly it wasn't checking that the salt stayed the same.

Turned out destroy was loading the stack config, seeing no encryptionsalt and so new'ing up a brand new passphrase secret manager and state and then saving that to the stack config.

This is now fixed that the test asserts that the salt is exactly what's expected and I've fixed up the engine code to do this correctly.

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

@pulumi-bot
Copy link
Contributor

pulumi-bot commented Feb 14, 2024

Changelog

[uncommitted] (2024-02-15)

Bug Fixes

  • [cli] Fix pulumi destroy to fill in stack config with the secret config from state, not fresh secret config.
    #15432

@Frassle Frassle force-pushed the fixTestDestroySetsEncryptionsalt branch from 3f3fe8a to 00107c2 Compare February 14, 2024 23:27
@Frassle Frassle requested a review from a team February 14, 2024 23:31
@Frassle Frassle marked this pull request as ready for review February 14, 2024 23:31
@Frassle Frassle added this pull request to the merge queue Feb 15, 2024
Merged via the queue into master with commit 60f1abc Feb 15, 2024
46 checks passed
@Frassle Frassle deleted the fixTestDestroySetsEncryptionsalt branch February 15, 2024 10:48
@justinvp justinvp mentioned this pull request Feb 15, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 16, 2024
### Features

- [components] Component providers can return output values in their
response to the engine.
  [#15408](#15408)

- [programgen/{dotnet,go,nodejs,python}] Emit missing trivia for
resources and local variables
  [#15419](#15419)

- [sdk/{nodejs,python}] Publish dev versions of the nodejs and python
SDKs


### Bug Fixes

- [cli] Fix `pulumi destroy` to fill in stack config with the secret
config from state, not fresh secret config.
  [#15432](#15432)

- [engine] Engine no longer assumes program dependencies are specified
as semantic versions.
  [#15409](#15409)

- [components/go] Component providers now correctly return output values
to the engine.
  [#15405](#15405)


### Miscellaneous

- [protobuf] Split CallRequest into ResourceCallRequest for the
ResourceMonitor service.
  [#15404](#15404)

- [backend/diy] Add a warning that non-project mode will be deprecated
at some point.
  [#15411](#15411)
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.

None yet

3 participants