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: Improve hyperdrive create and update to include all current caching settings #5064

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

OilyLime
Copy link
Contributor

@OilyLime OilyLime commented Feb 21, 2024

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
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • 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.

@OilyLime OilyLime requested a review from a team as a code owner February 21, 2024 02:36
Copy link

changeset-bot bot commented Feb 21, 2024

🦋 Changeset detected

Latest commit: 1cf9aad

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

Copy link

gitguardian bot commented Feb 21, 2024

⚠️ 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 1cf9aad 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!

}
const updated = await updateConfig(config, args.id, database);

const updated = await patchConfig(config, args.id, database);
Copy link
Contributor Author

@OilyLime OilyLime Feb 21, 2024

Choose a reason for hiding this comment

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

  • This relies on new PATCH handler that is not yet available in production. Do not merge until this handler has been released.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PATCH handler has been released and is documented here: https://developers.cloudflare.com/api/operations/patch-hyperdrive

Copy link
Contributor

github-actions bot commented Feb 21, 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/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.


wrangler@3.33.0 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.

Copy link

codecov bot commented Feb 21, 2024

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%) ⬆️
packages/wrangler/src/hyperdrive/create.ts 78.12% <ø> (-0.67%) ⬇️
packages/wrangler/src/hyperdrive/update.ts 96.87% <95.45%> (+83.08%) ⬆️

... and 5 files with indirect coverage changes

@OilyLime OilyLime force-pushed the improve-hyperdrive-update branch 2 times, most recently from 6a74adf to b8eb387 Compare February 21, 2024 18:26
.changeset/strong-drinks-burn.md Outdated Show resolved Hide resolved
@OilyLime
Copy link
Contributor Author

OilyLime commented Mar 1, 2024

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

@petebacondarwin petebacondarwin merged commit bd935cf into cloudflare:main Mar 14, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants