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

[wrangler] Allow empty strings in secret:bulk #4860

Merged
merged 4 commits into from
Jan 30, 2024

Conversation

Sibirius
Copy link
Contributor

What this PR solves / how to test:
Previously when running secret:bulk with a secret.json containing a variable with an empty string as value the bulk operation would fail. This was due to the check for a falsy value when merging instead of comparing to undefined to make sure all specified values are excluded. The old other check would keep both the current value and the new value in the merged list which would then be rejected by the settings API as it doesn't allow the same key to be present multiple times.

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: just a small fix

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@Sibirius Sibirius requested a review from a team as a code owner January 29, 2024 15:59
Copy link

changeset-bot bot commented Jan 29, 2024

🦋 Changeset detected

Latest commit: ac9b5d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jan 29, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7699491551/npm-package-wrangler-4860

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/4860/npm-package-wrangler-4860

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7699491551/npm-package-wrangler-4860 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7699491551/npm-package-create-cloudflare-4860 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7699491551/npm-package-miniflare-4860
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7699491551/npm-package-cloudflare-pages-shared-4860

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.25.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231218.4
workerd 1.20231218.0 1.20231218.0
workerd --version 1.20231218.0 2023-12-18

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@Sibirius Sibirius force-pushed the allow-empty-strings-in-bulk-secrets branch from 705181a to ac9b5d0 Compare January 29, 2024 16:45
@Sibirius Sibirius requested a review from mrbbot January 30, 2024 09:06
Copy link
Contributor

@mrbbot mrbbot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for fixing that. 🙂

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fbd2a4c) 70.70% compared to head (ac9b5d0) 70.72%.
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4860      +/-   ##
==========================================
+ Coverage   70.70%   70.72%   +0.02%     
==========================================
  Files         291      291              
  Lines       15164    15165       +1     
  Branches     3859     3859              
==========================================
+ Hits        10721    10725       +4     
+ Misses       4443     4440       -3     
Files Coverage Δ
packages/wrangler/src/secret/index.ts 83.33% <100.00%> (+0.09%) ⬆️

... and 5 files with indirect coverage changes

@mrbbot mrbbot merged commit b92e5ac into cloudflare:main Jan 30, 2024
17 checks passed
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.

2 participants