Skip to content

functions:secrets:set does not destroy the stale version of the secret #6074

Closed

Description

@kitfit-dave

Environment info

firebase-tools: 12.4.2

Platform: macOS 13.4

Test case

Updating a secret that was previously created and is used in one or more functions claims to "destroy the stale version" of the secret after the re-deploy, but does not do so.

Steps to reproduce

  • firebase functions:secrets:set MY_KEY
  • answer Y to Do you want to re-deploy the functions and destroy the stale version of secret MY_KEY

Expected behavior

new MY_KEY version to be added
previous MY_KEY version to be in "Destroyed" state

Actual behavior

new MY_KEY version to be added
previous MY_KEY version still in "Enabled" state

Note: subsequent firebase functions:secrets:prune does identify and destroy the old version

Activity

  1. aalej commented on Jul 5, 2023

    @aalej
    Contributor

    Hi @kitfit-dave, thanks for bringing this to our attention. I was able to replicate this. Let me check what we can do for this issue or bring someone here who can provide more context about this behavior.

  2. self-assigned this
    on Jul 5, 2023
  3. taeold commented on Jul 5, 2023

    @taeold
    Contributor

    Looks like this bug is left over from #4459 where we pulled out the feature to remove secrets on a successful set operation due to a nasty bug that removed almost all secrets IN USE 😱. Working on a bug-free, safer version now.

  4. added a commit that references this issue on Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions