Closed jahands closed 5 days ago
We now have some baby tests in wranglerAction.test.ts
#322 , so it's possible to write some tests for uploadSecrets()
if you're so inclined!
Yeah, this would be a pretty major behavioural change to revert to the old method of setting individual secrets. Using wrangler secret put
for tens of secrets within a worker can result in errors from the API since they're run in parallel and sometimes don't get acknowledged quickly enough and then cause a mismatch, as well as that many individual new deploys of your worker, cluttering up the versions list. Not to mention drastically slow down the deploy time too.
Closing as this was not the right way to fix this. Looking into improving logging in bulk puts
wrangler secret:bulk
is deprecated and will be removed in a future version.This improves logging in cases where a secret is failing to upload because an environment variable with the same name already exists (see: #240). Example:
With this change, we get this:
Testing:
Tested with a repo where the Worker already contains a secret of a different type: https://github.com/jahands/wrangler-action-example/actions/runs/11895527967/job/33145312742