workers-sdk icon indicating copy to clipboard operation
workers-sdk copied to clipboard

wrangler: Improve hyperdrive create and update to include all current caching settings

Open mtlemilio opened this issue 1 year ago • 5 comments

Fixes # SQC-200

What this PR solves / how to test:

This PR adds more options in the hyperdrive create and hyperdrive update subcommands for users to update all the caching settings of their Hyperdrive configs.

Author has addressed the following:

  • Tests
    • [x] Included
    • [ ] Not necessary because:
  • Changeset (Changeset guidelines)
    • [x] Included
    • [ ] Not necessary because:
  • Associated docs
    • [x] Issue(s)/PR(s):
    • [ ] Not necessary because:

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.

mtlemilio avatar Feb 21 '24 02:02 mtlemilio

🦋 Changeset detected

Latest commit: 1cf9aad3ec6d1ac4134ed253f70cc64a3334efb5

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers 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

changeset-bot[bot] avatar Feb 21 '24 02:02 changeset-bot[bot]

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
- Generic Database Assignment 1cf9aad3ec6d1ac4134ed253f70cc64a3334efb5 packages/wrangler/src/tests/hyperdrive.test.ts View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

gitguardian[bot] avatar Feb 21 '24 02:02 gitguardian[bot]

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/8272026267/npm-package-wrangler-5064

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-wrangler-5064 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-create-cloudflare-5064 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-cloudflare-kv-asset-handler-5064
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-miniflare-5064
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-cloudflare-pages-shared-5064
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8272026267/npm-package-cloudflare-vitest-pool-workers-5064

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240304.1
workerd 1.20240304.0 1.20240304.0
workerd --version 1.20240304.0 2024-03-04

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

github-actions[bot] avatar Feb 21 '24 02:02 github-actions[bot]

Codecov Report

Attention: Patch coverage is 96.15385% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 71.43%. Comparing base (03484c2) to head (1cf9aad).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5064      +/-   ##
==========================================
+ Coverage   71.26%   71.43%   +0.17%     
==========================================
  Files         309      309              
  Lines       16075    16081       +6     
  Branches     4105     4103       -2     
==========================================
+ Hits        11456    11488      +32     
+ Misses       4619     4593      -26     
Files Coverage Δ
packages/wrangler/src/hyperdrive/client.ts 83.33% <100.00%> (+3.33%) :arrow_up:
packages/wrangler/src/hyperdrive/create.ts 78.12% <ø> (-0.67%) :arrow_down:
packages/wrangler/src/hyperdrive/update.ts 96.87% <95.45%> (+83.08%) :arrow_up:

... and 5 files with indirect coverage changes

codecov[bot] avatar Feb 21 '24 02:02 codecov[bot]

Bump. This guy should be good to go, the security check is a false alarm. Flagging a secret in a test file.

mtlemilio avatar Mar 01 '24 22:03 mtlemilio