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

chore(wrangler): Configuration keys clean-up #5123

Merged
merged 1 commit into from
Apr 21, 2024

Conversation

CarmenPopoviciu
Copy link
Contributor

As part of an ongoing "configuration keys in wrangler" audit, this commit cleans up some of the configuration related comments, annotations, aso, in an attempt to keep things consistent and updated across the board.

Fixes # [insert GH or internal issue number(s)].

What this PR solves / how to test:

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because: it's mostly code comments changes
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: cleaning up docs around configuration will be a separate effort we're tracking internally

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.

@CarmenPopoviciu CarmenPopoviciu requested a review from a team as a code owner February 29, 2024 14:43
Copy link

changeset-bot bot commented Feb 29, 2024

⚠️ No Changeset found

Latest commit: 3c26de4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link
Contributor

github-actions bot commented Feb 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/8775208500/npm-package-wrangler-5123

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.51.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240405.2
workerd 1.20240405.0 1.20240405.0
workerd --version 1.20240405.0 2024-04-05

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

Copy link

codecov bot commented Feb 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.41%. Comparing base (2789f26) to head (49cf774).
Report is 51 commits behind head on main.

❗ Current head 49cf774 differs from pull request most recent head 3c26de4. Consider uploading reports for the commit 3c26de4 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5123      +/-   ##
==========================================
- Coverage   72.44%   70.41%   -2.04%     
==========================================
  Files         331      298      -33     
  Lines       17298    15519    -1779     
  Branches     4422     3990     -432     
==========================================
- Hits        12532    10927    -1605     
+ Misses       4766     4592     -174     

see 131 files with indirect coverage changes

*
* // Carmen according to our tests the default is undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

The default isn't quite undefined: it's a bit weird. It's documented https://developers.cloudflare.com/workers/configuration/routing/routes/#routes-with-workersdev, but essentially the default is true unless you have route or routes defined, in which case the default is false.

@@ -423,13 +417,13 @@ interface EnvironmentNonInheritable {
* NOTE: This field is not automatically inherited from the top level environment,
* and so must be specified in every named environment.
*
* @default `{}`
* @default `{consumers:[],producers:[]}`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

as per our tests, this seems to be the default

* @default `[]`
* @nonInheritable
*/
dispatch_namespaces: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

can we pls confirm this is indeed nonInheritable? The code comment seems to point to that, but the key was listed in the inheritable list

Copy link
Contributor

Choose a reason for hiding this comment

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

Based on this line...

dispatch_namespaces: notInheritable(

...it seems like this is indeed non inheritable.

Copy link
Contributor

Choose a reason for hiding this comment

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

In which case it is in the incorrect interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

indeed. will fix that!

@petebacondarwin petebacondarwin self-assigned this Apr 21, 2024
As part of an ongoing "configuration keys in wrangler"
audit, this commit cleans up some of the configuration
related comments, annotations, aso, in an attempt to
keep things consistent and updated across the board.
@petebacondarwin petebacondarwin force-pushed the carmen/config-keys-cleanup branch 3 times, most recently from cd0880d to 3c26de4 Compare April 21, 2024 20:09
@petebacondarwin petebacondarwin merged commit 1f2c1e3 into main Apr 21, 2024
15 checks passed
@petebacondarwin petebacondarwin deleted the carmen/config-keys-cleanup branch April 21, 2024 20:34
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.

4 participants