Skip to content

🐛 BUG: regression: secret:bulk broken presumably due #4179 #4496

Closed

Description

@aroman

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.17.1

What version of Node are you using?

No response

What operating system are you using?

mac, linux

Describe the Bug

It seems like #4179 changed secret:bulk from using the secrets PUT API to script PATCH... this sounds like a good idea, but in practice, it seems to have broken our CI builds without any notice about this in the changelog, or without any explanation given in the CLI output or wrangler.log

CleanShot 2023-11-22 at 14 39 44@2x

I am happy to share more detailed logging output privately if someone is interested.

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

--- 2023-11-22T22:36:22.137Z log
 ⛅️ wrangler 3.17.1
-------------------
---

--- 2023-11-22T22:36:22.141Z debug
Saving to cache: {"account":{"id":"***","name":""}}
---

--- 2023-11-22T22:36:22.142Z log
🌀 Creating the secrets for the Worker "gg-preview-pr-667-gameserver" 
---

--- 2023-11-22T22:36:22.145Z debug
-- START CF API REQUEST: GET https://api.cloudflare.com/client/v4/accounts/***/workers/scripts/gg-preview-pr-667-gameserver/settings
---

--- 2023-11-22T22:36:22.145Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.145Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.145Z debug
-- END CF API REQUEST
---

--- 2023-11-22T22:36:22.557Z debug
-- START CF API RESPONSE: OK 200
---

--- 2023-11-22T22:36:22.557Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.557Z debug
RESPONSE: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.557Z debug
-- END CF API RESPONSE
---

--- 2023-11-22T22:36:22.558Z debug
-- START CF API REQUEST: PATCH https://api.cloudflare.com/client/v4/accounts/***/workers/scripts/gg-preview-pr-667-gameserver/settings
---

--- 2023-11-22T22:36:22.558Z debug
HEADERS: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.558Z debug
INIT: omitted; set WRANGLER_LOG_SANITIZE=false to include sanitized data
---

--- 2023-11-22T22:36:22.558Z debug
-- END CF API REQUEST
---

Activity

  1. aroman commented on Nov 22, 2023

    @aroman
    Author
  2. penalosa commented on Nov 22, 2023

    @penalosa
    Contributor

    Thanks for reporting this! To investigate this a bit more:

    • If you try uploading the same secrets to a brand new worker (either locally or in CI), do you see the same behaviour?
    • What's the structure of your secrets? Are they all text or do you have some JSON values?
  3. aroman commented on Nov 22, 2023

    @aroman
    Author

    @penalosa thanks for the quick followup here.

    Thanks for reporting this! To investigate this a bit more:

    • If you try uploading the same secrets to a brand new worker (either locally or in CI), do you see the same behaviour?

    Much to my surprise, the identical secret:bulk command works fine for new workers created from wrangler or the dash, but apparently not the worker created by our CI deployment script. Any idea what could possibly cause this discrepancy?

    • What's the structure of your secrets? Are they all text or do you have some JSON values?

    JSON. And it's worth noting that wrangler is clearly parsing it correctly, since the error message indicates the correct # of secrets.

  4. penalosa commented on Nov 22, 2023

    @penalosa
    Contributor

    Much to my surprise, the identical secret:bulk command works fine for new workers created from wrangler or the dash, but apparently not the worker created by our CI deployment script. Any idea what could possibly cause this discrepancy?

    Interesting! Do you have any other bindings defined on the worker created in CI?

  5. aroman commented on Nov 22, 2023

    @aroman
    Author

    yes, a durable object binding

  6. penalosa commented on Nov 23, 2023

    @penalosa
    Contributor

    @aroman We've investigated this a bit further, and it looks like this is a bug in Wrangler when uploading secrets using secret:bulk to a Worker that has a Durable Object attached. Thanks for flagging this!

    We're working on a fix—in the meantime the workaround is to use Wrangler v3.16

  7. moved this from Untriaged to Backlog in workers-sdkon Nov 23, 2023
  8. BarnabyShearer commented on Jan 4, 2024

    @BarnabyShearer

    https://nvd.nist.gov/vuln/detail/CVE-2023-7080 makes the workaround much less appealing; we really need this fixed.

  9. lrapoport-cf commented on Jan 8, 2024

    @lrapoport-cf
    Contributor

    hi all, to clarify, this is related to internal bugs (internal tickets: WC-1668, WC-1774, and WC-1613). WC-1613 has been addressed and WC-1774 is in progress; WC-1668 is still outstanding. i'll follow up internally to get info regarding timelines.

  10. moved this from Backlog to Done in workers-sdkon Jan 18, 2024
  11. lrapoport-cf commented on Jan 23, 2024

    @lrapoport-cf
    Contributor

    hi all, to clarify, this is related to internal bugs (internal tickets: WC-1668, WC-1774, and WC-1613). WC-1613 has been addressed and WC-1774 is in progress; WC-1668 is still outstanding. i'll follow up internally to get info regarding timelines.

    i know this issue is now closed, but to be explicit for posterity: the internal tickets have now all been completed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalRequires support from the Cloudflare Platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions