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] test: fix E2E tests #4907

Merged
merged 24 commits into from
Feb 6, 2024
Merged

[wrangler] test: fix E2E tests #4907

merged 24 commits into from
Feb 6, 2024

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Feb 2, 2024

What this PR solves / how to test:

#4458 accidentally left a continue-on-error: true in our E2E testing GitHub actions workflow. This meant E2E test failures weren't reported as check failures. This PR fixes that, and updates the E2E tests so they pass with the changes that have been added since then.

It includes a couple of user-facing changes for issues that these tests would've caught. See commit descriptions for more details on the changes.

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: fixing regressions

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.

#4458 accidentally left `continue-on-error: true` in the workflow.
This meant that E2E test failures weren't reported as check failures.
This test was a strict subset of `deployments.test.ts`, and wasn't
providing any additional value.
This warning may not be shown if an account has opted-in to standard
pricing. This change normalises output to remove it, meaning tests
can be run on any account, regardless of opt-in state.
#4571 updated the message logged in non-interactive contexts for
default values to use the word `fallback` instead of `default`.
Some messages were being logged before the `--log-level` argument was
applied. In particular, this meant the "writing logs to" message at
`debug` level, was not output when using `--log-level=debug`.
This change makes a few improvements to `dev.test.ts`:

- Shorter timeouts for `fetch()` retries
- Replaces `get-port` with native port `0` implementation
- Waits for stdout handlers to be registered before starting
  `wrangler dev`
- Ignores errors if we failed to find a proccess to kill
  (assumes the process was already killed)
These errors should not be reported to Sentry.
@mrbbot mrbbot requested a review from a team as a code owner February 2, 2024 14:35
Copy link

changeset-bot bot commented Feb 2, 2024

🦋 Changeset detected

Latest commit: 98e1bd5

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

@mrbbot mrbbot added the e2e Run e2e tests on a PR label Feb 2, 2024
@mrbbot mrbbot changed the title [wrangler]: test: fix E2E tests [wrangler] test: fix E2E tests Feb 2, 2024
Copy link
Contributor

github-actions bot commented Feb 2, 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/7804446096/npm-package-wrangler-4907

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.26.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240129.0
workerd 1.20240129.0 1.20240129.0
workerd --version 1.20240129.0 2024-01-29

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

@@ -82,12 +104,18 @@ async function runDevSession(
};
bg.process.stdout.on("data", (chunk) => (sessionData.stdout += chunk));
bg.process.stderr.on("data", (chunk) => (sessionData.stderr += chunk));
// Only start `wrangler dev` once we've registered output listeners so we don't miss messages
promiseResolve?.();
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking but... this is a bit gross and we should investigate fixing the need for this in shellac

Comment on lines +86 to +87
let promiseResolve: (() => void) | undefined;
const promise = new Promise<void>((resolve) => (promiseResolve = resolve));
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: could probably use createDeferred here

Comment on lines +227 to +231
// Update logger level, before we do any logging
if (Object.keys(LOGGER_LEVELS).includes(args.logLevel as string)) {
logger.loggerLevel = args.logLevel as LoggerLevel;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link

codecov bot commented Feb 2, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (3cb2a8a) 70.64% compared to head (0a22759) 70.58%.
Report is 14 commits behind head on main.

❗ Current head 0a22759 differs from pull request most recent head 98e1bd5. Consider uploading reports for the commit 98e1bd5 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4907      +/-   ##
==========================================
- Coverage   70.64%   70.58%   -0.07%     
==========================================
  Files         292      293       +1     
  Lines       15183    15215      +32     
  Branches     3863     3879      +16     
==========================================
+ Hits        10726    10739      +13     
- Misses       4457     4476      +19     
Files Coverage Δ
packages/wrangler/src/dev.tsx 81.56% <100.00%> (ø)
packages/wrangler/src/index.ts 89.77% <100.00%> (-0.07%) ⬇️
packages/wrangler/src/r2/helpers.ts 87.95% <80.00%> (-0.94%) ⬇️
packages/wrangler/src/r2/index.ts 86.47% <50.00%> (-0.44%) ⬇️
packages/wrangler/src/cfetch/internal.ts 81.96% <33.33%> (-1.37%) ⬇️

... and 13 files with indirect coverage changes

@@ -74,8 +74,6 @@ jobs:
run: echo "dir=$(ls $HOME/wrangler-*.tgz)" >> $GITHUB_OUTPUT;

- name: Run tests
id: e2e-1
continue-on-error: true
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

Why delete this whole file?

@@ -46,6 +50,20 @@ interface SessionData {
stderr: string;
}

function getPort() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use the get-port package for this?

@petebacondarwin
Copy link
Contributor

Screenshot 2024-02-02 at 15 23 58

@petebacondarwin
Copy link
Contributor

Seems like the E2E tests are not actually fixed?

@mrbbot
Copy link
Contributor Author

mrbbot commented Feb 2, 2024

Seems like the E2E tests are not actually fixed?

It would seem that way... 😅 Definitely passed locally, but I guess this is going to be more involved... 😞

@penalosa penalosa merged commit 583e445 into main Feb 6, 2024
17 checks passed
@penalosa penalosa deleted the bcoll/fix-e2e-tests branch February 6, 2024 19:04
@workers-devprod workers-devprod mentioned this pull request Feb 6, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

cc @Lekensteyn

We had to fix this because checking via localhost for port 9229 could say that it was available twice - once for 127.0.0.1 and again for ::1, which mean that we ended up with two Wrangler sessions that both tried to start workerd on 127.0.0.1:9229; the second of which would fail.

lrapoport-cf pushed a commit that referenced this pull request Feb 8, 2024
* ci: only deploy Workers when pushing to special branches (#4848)

Previously every push to `main` that contained changes to a Worker package would cause that Worker to be deploy "to production".
This meant that we had to be very careful about merging PRs that touch these Workers files.

Now production deployment is only run for a Worker on a push to its special deployment branch (e.g. `deploy-worker/playground-preview-worker`).
This allows us to land PRs to `main` and then collect up changes to release in a single go by updating the special deployment branch in a controlled way.
Moreover it is also easy to see what changes will be released by looking at the difference between `main` and the deployment branch for the Worker package directory.

The three workers in this repo now follow this pattern:

- edge-preview-authenticated-proxy
- format-errors
- playground-preview-worker

In addition, the Playground Preview Worker has end-to-end tests that are run on every push to the `main` branch, and also any PRs that have the "playground-worker" label.
For these tests the Worker is deployed to the testing environment before running the tests against this deployment.

* C3: bump `create-next-app` and handle new `next.config.mjs` defaults (#4863)

* bump create-next-app from 14.0.4 to 14.1.0

* C3: handle new next.config.mjs default files

* [wrangler] Support ai bindings in getBindingsProxy (#4869)

* Retain AI service binding from miniflare options

* Update changeset

* chore: bump `workerd` to `1.20240129.0` (#4874)

* [C3] Bump create-vue from 3.9.1 to 3.9.2 in /packages/create-cloudflare/src/frameworks (#4870)

* [C3] Bump create-vue in /packages/create-cloudflare/src/frameworks

Bumps [create-vue](https://github.com/vuejs/create-vue) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/vuejs/create-vue/releases)
- [Commits](vuejs/create-vue@v3.9.1...v3.9.2)

---
updated-dependencies:
- dependency-name: create-vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* Exclude standardPricingWarning from dryrun (#4880)

* Exclude standardPricingWarning from dryrun

That way we do not need authentication for dryrun, again.

* fixup! Exclude standardPricingWarning from dryrun

* fixup! Exclude standardPricingWarning from dryrun

---------

Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>

* Implements Python support in miniflare. (#4873)

* Fix changesets (#4885)

* fix dario-piotrowicz's changesets

* fix existing C3 changesets and amend the changeset text in the creation logic

* Version Packages (#4854)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Bump create-qwik from 1.4.2 to 1.4.3 in /packages/create-cloudflare/src/frameworks (#4881)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.3/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [wrangler] fix: listen on loopback for wrangler dev port check and login (#4830)

The `wrangler dev` port availability check triggers a firewall prompt on
macOS while it briefly opens and closes listeners. The OAuth callback
server from `wrangler login` has the same issue.

Fix both cases by listening on the loopback address only by default.

Fixed some new test failures by using locally available IP addresses:

    wrangler:test:   ● wrangler dev › ip › should use to `ip` from `wrangler.toml`, if available
    wrangler:test:     listen EADDRNOTAVAIL: address not available 1.2.3.4:8787
    wrangler:test:
    wrangler:test:   ● wrangler dev › ip › should use --ip command line arg, if provided
    wrangler:test:     listen EADDRNOTAVAIL: address not available 5.6.7.8:8787

Relates to #4430

* remove outdated and no longer valid miniflare development section from CONTRIBUTING.md (#4893)

* [C3] Bump @angular/create from 17.1.1 to 17.1.2 in /packages/create-cloudflare/src/frameworks (#4892)

* [C3] Bump @angular/create in /packages/create-cloudflare/src/frameworks

Bumps [@angular/create](https://github.com/angular/angular-cli) from 17.1.1 to 17.1.2.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](angular/angular-cli@17.1.1...17.1.2)

---
updated-dependencies:
- dependency-name: "@angular/create"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [Stream] WebRTC Template Improvements (#4157)

* Add port numbers to fix stackblitz automatic startup

* Pull the variables up and show clear instructions

* fixup! Pull the variables up and show clear instructions

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>

* fix: return 4xx error from playground preview worker on invalid tokens (#4904)

Previously, we were passing user-controllable token inputs
(`X-CF-Token` header, `user` search param, `token` cookie) directly to
the `DurableObjectNamespace#idFromString()` function. This validated
the token to be a valid Durable Object ID, but threw a reportable
`TypeError`, generating a 500 response and increasing the errored
request count. This is a user error, so shouldn't be reported. This
change wraps calls to `idFromString()` inside `try`/`catch`es, and
re-throws non-reportable user errors that generate 4xx responses.
We could just validate that the tokens were 64 hex digits before
calling `idFromString()`, but this approach ensures the IDs are for
the `UserSession` object by validating the signature encoded in the
ID too.

* chore: rename deprecated Vitest `TestContext.meta` properties to `TestContext.task` (#4897)

This is a precursor to updating to latest Vitest.

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886) (#4877)

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* Update .changeset/hip-files-count.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [C3] Bump create-remix from 2.5.1 to 2.6.0 in /packages/create-cloudflare/src/frameworks (#4903)

* [C3] Bump create-remix in /packages/create-cloudflare/src/frameworks

Bumps [create-remix](https://github.com/remix-run/remix/tree/HEAD/packages/create-remix) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/remix-run/remix/releases)
- [Changelog](https://github.com/remix-run/remix/blob/main/packages/create-remix/CHANGELOG.md)
- [Commits](https://github.com/remix-run/remix/commits/create-remix@2.6.0/packages/create-remix)

---
updated-dependencies:
- dependency-name: create-remix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: ensure that the Pages dev proxy server does not change the Host header (#4888)

* fix: ensure that the Pages dev proxy server does not change the Host header

Previously, when configuring `wrangler pages dev` to use a proxy to a 3rd party dev server,
the proxy would replace the Host header, resulting in problems at the dev server if it was
checking for cross-site scripting attacks.

Now the proxy server passes through the Host header unaltered making it invisible to the
3rd party dev server.

Fixes #4799

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fix: fallback to returning stack trace if `format-errors` broken (#4908)

* expose cf object from Miniflare instances (#4905)

* expose cf object from Miniflare instances

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* Add a `ctx` field to the `getBindingsProxy` result (#4922)

* split get-bindings-proxy fixture tests in multiple files

* add ctx to getBindingsProxy

* add ctx tests to get-bindings-proxy fixture

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* fix(d1): intercept and stringify errors thrown in --json mode (#4872)

* fix(d1): intercept and stringify errors thrown in --json mode

* fix: add light parsing on d1 execute error message

* add test

* wip

* implement JsonFriendlyFatalError

* address PR feedback

* fix: don't report invalid `format-errors` input (#4911)

* [D1] Add user friendly D1 validation error messages for `dev --remote` and `deploy` (#4914)

* chore: refactor user friendly errors and add 10063 code handling

* chore: add user friendly error message to deployments

* chore: lint

* chore: cleanup directory

* chore: fix remote error handling

* chore: add patch change set

* chore: move ABORT_ERR logic out of the user friendly error handler

* chore: fix syntax

* Update .changeset/fair-shoes-melt.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [D1] teach wrangler how to fetch insights about D1's queries (#4909)

* [D1] teach wrangler how to fetch insights about D1's queries

* add options for sorting and number of results

* add a means of filtering the datetime geq/leq

* add more options, fix tests

* add wrangler banner, add warning text

* add changeset

* rename last to timePeriod

* use string format over numbers as >1mo's data could be possible

* Update red-icons-flow.md

* make it possible to order by count

* Update red-icons-flow.md

* PR feedback

* Update .changeset/red-icons-flow.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* address PR feedback

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [wrangler] test: fix E2E tests (#4907)

* ci: ensure E2E tests failures not reported as successes

#4458 accidentally left `continue-on-error: true` in the workflow.
This meant that E2E test failures weren't reported as check failures.

* test: remove redundant `deploy.test.ts` E2E test

This test was a strict subset of `deployments.test.ts`, and wasn't
providing any additional value.

* test: remove standard pricing warning from E2E test output

This warning may not be shown if an account has opted-in to standard
pricing. This change normalises output to remove it, meaning tests
can be run on any account, regardless of opt-in state.

* test: update format of writing logs message in E2E tests

* test: use `fallback` instead of `default` in E2E tests

#4571 updated the message logged in non-interactive contexts for
default values to use the word `fallback` instead of `default`.

* fix: ensure `--log-level` argument applied immediately

Some messages were being logged before the `--log-level` argument was
applied. In particular, this meant the "writing logs to" message at
`debug` level, was not output when using `--log-level=debug`.

* test: improve reliability of `dev.test.ts` E2E test

This change makes a few improvements to `dev.test.ts`:

- Shorter timeouts for `fetch()` retries
- Replaces `get-port` with native port `0` implementation
- Waits for stdout handlers to be registered before starting
  `wrangler dev`
- Ignores errors if we failed to find a proccess to kill
  (assumes the process was already killed)

* fix: throw `UserError`s for R2 object/bucket not-found errors

These errors should not be reported to Sentry.

* global install

* Ensure internal workers listen on ipv4 only

* shorter timeouts


---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>

* Python support (#4901)

* Implements wrangler deploy/dev support for Python.

* Migrate to `--no-bundle` approach

* Basic support for `requirements.txt`

* address review comments

* Strip package versions

* Support deploying

* Address comments

* Fix tests

---------

Co-authored-by: Dominik Picheta <dominik@cloudflare.com>

* Version Packages (#4891)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Add `getBindingsProxy` support to qwik template (#4927)

* Split package.json update into multiple phases

* Add getBindingsProxy to qwik template

* Add support for testing dev scripts in c3 e2e tests

* Refactor framework e2e verification helpers

* Add support for verifying build script in framework e2es

* Refactor e2e helpers

* Refactor workers e2e tests to re-align with frameworks tests

* Refactor RunnerConfig in e2e tests

* Fixing cli e2e tests

* changeset

* remove leftover test value

* Fix issue with npm tests & fix e2e logging

* Addressing PR feedback

* [playground-preview-worker] fix: don't report invalid upload input (#4937)

* fix: don't report invalid `edge-preview-authenticated-proxy` URLs (#4939)

* [D1] print wrangler banner at the start of every D1 command (#4938)

* fix: make the entrypoint optional for the `types` command (#4931)

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* add a `cf` field to the `getBindingsProxy` result (#4926)


---------

Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>

* Improve DX with `node:*` modules (#4499)

* Turn node build failures into warnings

* Allow files to suppress warnings for specific modules

* Remove comment-based allow-listing

* Add changeset

* Update .changeset/chatty-balloons-impress.md

Co-authored-by: James M Snell <jasnell@gmail.com>

* Pass through `defineNavigatorUserAgent`

* Add tests

* lockfile

* Linting

* fix tests

---------

Co-authored-by: James M Snell <jasnell@gmail.com>

* improve(r2): Update Sippy endpoint request payloads to match new schema (#4928)

* fix(r2): update Sippy API request payloads

* improve(r2): rename sippy flags for clarity

* improve(r2): stricter existence in Sippy

* [C3] Bump create-qwik from 1.4.3 to 1.4.4 in /packages/create-cloudflare/src/frameworks (#4935)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.4/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: allow `port` option to be specified with `unstable_dev()` (#4953)

* Extend error handling of proxy request errors in ProxyWorker (#4867)

* ignore stale proxy errors

* attempt to recover from ProxyWorker fetch errors
by requeuing the request (only if it is GET or HEAD)

* add test

* add changeset

* refactor to flatten nested if-else blocks

* requeue request for retry at front of queue

* sort batch of requests in queue by order of arrival

* Revert "sort batch of requests in queue by order of arrival"

This reverts commit 3329f19.

* Revert "requeue request for retry at front of queue"

This reverts commit f0377b7.

* prioritise requests being retried
over requests being proxied for the first time

* better comments

* update changeset to match recommeded format

* Update five-cooks-share.md (#4956)

* Version Packages (#4934)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
Co-authored-by: workers-devprod@cloudflare.com <116369605+workers-devprod@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Peter Wu <peter@lekensteyn.nl>
Co-authored-by: Taylor Smith <tsmith@tsmith.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Magnus Dahlstrand <magnusdahlstrand@users.noreply.github.com>
Co-authored-by: Max Rozen <3822106+rozenmd@users.noreply.github.com>
Co-authored-by: Nora Söderlund <norasoderlund@icloud.com>
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: Dominik Picheta <dominik@cloudflare.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Siddhant <siddhant@cloudflare.com>
Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
lrapoport-cf pushed a commit that referenced this pull request Feb 8, 2024
* ci: only deploy Workers when pushing to special branches (#4848)

Previously every push to `main` that contained changes to a Worker package would cause that Worker to be deploy "to production".
This meant that we had to be very careful about merging PRs that touch these Workers files.

Now production deployment is only run for a Worker on a push to its special deployment branch (e.g. `deploy-worker/playground-preview-worker`).
This allows us to land PRs to `main` and then collect up changes to release in a single go by updating the special deployment branch in a controlled way.
Moreover it is also easy to see what changes will be released by looking at the difference between `main` and the deployment branch for the Worker package directory.

The three workers in this repo now follow this pattern:

- edge-preview-authenticated-proxy
- format-errors
- playground-preview-worker

In addition, the Playground Preview Worker has end-to-end tests that are run on every push to the `main` branch, and also any PRs that have the "playground-worker" label.
For these tests the Worker is deployed to the testing environment before running the tests against this deployment.

* C3: bump `create-next-app` and handle new `next.config.mjs` defaults (#4863)

* bump create-next-app from 14.0.4 to 14.1.0

* C3: handle new next.config.mjs default files

* [wrangler] Support ai bindings in getBindingsProxy (#4869)

* Retain AI service binding from miniflare options

* Update changeset

* chore: bump `workerd` to `1.20240129.0` (#4874)

* [C3] Bump create-vue from 3.9.1 to 3.9.2 in /packages/create-cloudflare/src/frameworks (#4870)

* [C3] Bump create-vue in /packages/create-cloudflare/src/frameworks

Bumps [create-vue](https://github.com/vuejs/create-vue) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/vuejs/create-vue/releases)
- [Commits](vuejs/create-vue@v3.9.1...v3.9.2)

---
updated-dependencies:
- dependency-name: create-vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* Exclude standardPricingWarning from dryrun (#4880)

* Exclude standardPricingWarning from dryrun

That way we do not need authentication for dryrun, again.

* fixup! Exclude standardPricingWarning from dryrun

* fixup! Exclude standardPricingWarning from dryrun

---------

Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>

* Implements Python support in miniflare. (#4873)

* Fix changesets (#4885)

* fix dario-piotrowicz's changesets

* fix existing C3 changesets and amend the changeset text in the creation logic

* Version Packages (#4854)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Bump create-qwik from 1.4.2 to 1.4.3 in /packages/create-cloudflare/src/frameworks (#4881)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.3/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [wrangler] fix: listen on loopback for wrangler dev port check and login (#4830)

The `wrangler dev` port availability check triggers a firewall prompt on
macOS while it briefly opens and closes listeners. The OAuth callback
server from `wrangler login` has the same issue.

Fix both cases by listening on the loopback address only by default.

Fixed some new test failures by using locally available IP addresses:

    wrangler:test:   ● wrangler dev › ip › should use to `ip` from `wrangler.toml`, if available
    wrangler:test:     listen EADDRNOTAVAIL: address not available 1.2.3.4:8787
    wrangler:test:
    wrangler:test:   ● wrangler dev › ip › should use --ip command line arg, if provided
    wrangler:test:     listen EADDRNOTAVAIL: address not available 5.6.7.8:8787

Relates to #4430

* remove outdated and no longer valid miniflare development section from CONTRIBUTING.md (#4893)

* [C3] Bump @angular/create from 17.1.1 to 17.1.2 in /packages/create-cloudflare/src/frameworks (#4892)

* [C3] Bump @angular/create in /packages/create-cloudflare/src/frameworks

Bumps [@angular/create](https://github.com/angular/angular-cli) from 17.1.1 to 17.1.2.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](angular/angular-cli@17.1.1...17.1.2)

---
updated-dependencies:
- dependency-name: "@angular/create"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [Stream] WebRTC Template Improvements (#4157)

* Add port numbers to fix stackblitz automatic startup

* Pull the variables up and show clear instructions

* fixup! Pull the variables up and show clear instructions

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>

* fix: return 4xx error from playground preview worker on invalid tokens (#4904)

Previously, we were passing user-controllable token inputs
(`X-CF-Token` header, `user` search param, `token` cookie) directly to
the `DurableObjectNamespace#idFromString()` function. This validated
the token to be a valid Durable Object ID, but threw a reportable
`TypeError`, generating a 500 response and increasing the errored
request count. This is a user error, so shouldn't be reported. This
change wraps calls to `idFromString()` inside `try`/`catch`es, and
re-throws non-reportable user errors that generate 4xx responses.
We could just validate that the tokens were 64 hex digits before
calling `idFromString()`, but this approach ensures the IDs are for
the `UserSession` object by validating the signature encoded in the
ID too.

* chore: rename deprecated Vitest `TestContext.meta` properties to `TestContext.task` (#4897)

This is a precursor to updating to latest Vitest.

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886) (#4877)

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* Update .changeset/hip-files-count.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [C3] Bump create-remix from 2.5.1 to 2.6.0 in /packages/create-cloudflare/src/frameworks (#4903)

* [C3] Bump create-remix in /packages/create-cloudflare/src/frameworks

Bumps [create-remix](https://github.com/remix-run/remix/tree/HEAD/packages/create-remix) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/remix-run/remix/releases)
- [Changelog](https://github.com/remix-run/remix/blob/main/packages/create-remix/CHANGELOG.md)
- [Commits](https://github.com/remix-run/remix/commits/create-remix@2.6.0/packages/create-remix)

---
updated-dependencies:
- dependency-name: create-remix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: ensure that the Pages dev proxy server does not change the Host header (#4888)

* fix: ensure that the Pages dev proxy server does not change the Host header

Previously, when configuring `wrangler pages dev` to use a proxy to a 3rd party dev server,
the proxy would replace the Host header, resulting in problems at the dev server if it was
checking for cross-site scripting attacks.

Now the proxy server passes through the Host header unaltered making it invisible to the
3rd party dev server.

Fixes #4799

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fix: fallback to returning stack trace if `format-errors` broken (#4908)

* expose cf object from Miniflare instances (#4905)

* expose cf object from Miniflare instances

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* Add a `ctx` field to the `getBindingsProxy` result (#4922)

* split get-bindings-proxy fixture tests in multiple files

* add ctx to getBindingsProxy

* add ctx tests to get-bindings-proxy fixture

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* fix(d1): intercept and stringify errors thrown in --json mode (#4872)

* fix(d1): intercept and stringify errors thrown in --json mode

* fix: add light parsing on d1 execute error message

* add test

* wip

* implement JsonFriendlyFatalError

* address PR feedback

* fix: don't report invalid `format-errors` input (#4911)

* [D1] Add user friendly D1 validation error messages for `dev --remote` and `deploy` (#4914)

* chore: refactor user friendly errors and add 10063 code handling

* chore: add user friendly error message to deployments

* chore: lint

* chore: cleanup directory

* chore: fix remote error handling

* chore: add patch change set

* chore: move ABORT_ERR logic out of the user friendly error handler

* chore: fix syntax

* Update .changeset/fair-shoes-melt.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [D1] teach wrangler how to fetch insights about D1's queries (#4909)

* [D1] teach wrangler how to fetch insights about D1's queries

* add options for sorting and number of results

* add a means of filtering the datetime geq/leq

* add more options, fix tests

* add wrangler banner, add warning text

* add changeset

* rename last to timePeriod

* use string format over numbers as >1mo's data could be possible

* Update red-icons-flow.md

* make it possible to order by count

* Update red-icons-flow.md

* PR feedback

* Update .changeset/red-icons-flow.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* address PR feedback

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [wrangler] test: fix E2E tests (#4907)

* ci: ensure E2E tests failures not reported as successes

#4458 accidentally left `continue-on-error: true` in the workflow.
This meant that E2E test failures weren't reported as check failures.

* test: remove redundant `deploy.test.ts` E2E test

This test was a strict subset of `deployments.test.ts`, and wasn't
providing any additional value.

* test: remove standard pricing warning from E2E test output

This warning may not be shown if an account has opted-in to standard
pricing. This change normalises output to remove it, meaning tests
can be run on any account, regardless of opt-in state.

* test: update format of writing logs message in E2E tests

* test: use `fallback` instead of `default` in E2E tests

#4571 updated the message logged in non-interactive contexts for
default values to use the word `fallback` instead of `default`.

* fix: ensure `--log-level` argument applied immediately

Some messages were being logged before the `--log-level` argument was
applied. In particular, this meant the "writing logs to" message at
`debug` level, was not output when using `--log-level=debug`.

* test: improve reliability of `dev.test.ts` E2E test

This change makes a few improvements to `dev.test.ts`:

- Shorter timeouts for `fetch()` retries
- Replaces `get-port` with native port `0` implementation
- Waits for stdout handlers to be registered before starting
  `wrangler dev`
- Ignores errors if we failed to find a proccess to kill
  (assumes the process was already killed)

* fix: throw `UserError`s for R2 object/bucket not-found errors

These errors should not be reported to Sentry.

* global install

* Ensure internal workers listen on ipv4 only

* shorter timeouts


---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>

* Python support (#4901)

* Implements wrangler deploy/dev support for Python.

* Migrate to `--no-bundle` approach

* Basic support for `requirements.txt`

* address review comments

* Strip package versions

* Support deploying

* Address comments

* Fix tests

---------

Co-authored-by: Dominik Picheta <dominik@cloudflare.com>

* Version Packages (#4891)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Add `getBindingsProxy` support to qwik template (#4927)

* Split package.json update into multiple phases

* Add getBindingsProxy to qwik template

* Add support for testing dev scripts in c3 e2e tests

* Refactor framework e2e verification helpers

* Add support for verifying build script in framework e2es

* Refactor e2e helpers

* Refactor workers e2e tests to re-align with frameworks tests

* Refactor RunnerConfig in e2e tests

* Fixing cli e2e tests

* changeset

* remove leftover test value

* Fix issue with npm tests & fix e2e logging

* Addressing PR feedback

* [playground-preview-worker] fix: don't report invalid upload input (#4937)

* fix: don't report invalid `edge-preview-authenticated-proxy` URLs (#4939)

* [D1] print wrangler banner at the start of every D1 command (#4938)

* fix: make the entrypoint optional for the `types` command (#4931)

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* add a `cf` field to the `getBindingsProxy` result (#4926)


---------

Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>

* Improve DX with `node:*` modules (#4499)

* Turn node build failures into warnings

* Allow files to suppress warnings for specific modules

* Remove comment-based allow-listing

* Add changeset

* Update .changeset/chatty-balloons-impress.md

Co-authored-by: James M Snell <jasnell@gmail.com>

* Pass through `defineNavigatorUserAgent`

* Add tests

* lockfile

* Linting

* fix tests

---------

Co-authored-by: James M Snell <jasnell@gmail.com>

* improve(r2): Update Sippy endpoint request payloads to match new schema (#4928)

* fix(r2): update Sippy API request payloads

* improve(r2): rename sippy flags for clarity

* improve(r2): stricter existence in Sippy

* [C3] Bump create-qwik from 1.4.3 to 1.4.4 in /packages/create-cloudflare/src/frameworks (#4935)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.4/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: allow `port` option to be specified with `unstable_dev()` (#4953)

* Extend error handling of proxy request errors in ProxyWorker (#4867)

* ignore stale proxy errors

* attempt to recover from ProxyWorker fetch errors
by requeuing the request (only if it is GET or HEAD)

* add test

* add changeset

* refactor to flatten nested if-else blocks

* requeue request for retry at front of queue

* sort batch of requests in queue by order of arrival

* Revert "sort batch of requests in queue by order of arrival"

This reverts commit 3329f19.

* Revert "requeue request for retry at front of queue"

This reverts commit f0377b7.

* prioritise requests being retried
over requests being proxied for the first time

* better comments

* update changeset to match recommeded format

* Update five-cooks-share.md (#4956)

* Version Packages (#4934)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
Co-authored-by: workers-devprod@cloudflare.com <116369605+workers-devprod@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Peter Wu <peter@lekensteyn.nl>
Co-authored-by: Taylor Smith <tsmith@tsmith.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Magnus Dahlstrand <magnusdahlstrand@users.noreply.github.com>
Co-authored-by: Max Rozen <3822106+rozenmd@users.noreply.github.com>
Co-authored-by: Nora Söderlund <norasoderlund@icloud.com>
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: Dominik Picheta <dominik@cloudflare.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Siddhant <siddhant@cloudflare.com>
Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
lrapoport-cf pushed a commit that referenced this pull request Feb 8, 2024
* ci: only deploy Workers when pushing to special branches (#4848)

Previously every push to `main` that contained changes to a Worker package would cause that Worker to be deploy "to production".
This meant that we had to be very careful about merging PRs that touch these Workers files.

Now production deployment is only run for a Worker on a push to its special deployment branch (e.g. `deploy-worker/playground-preview-worker`).
This allows us to land PRs to `main` and then collect up changes to release in a single go by updating the special deployment branch in a controlled way.
Moreover it is also easy to see what changes will be released by looking at the difference between `main` and the deployment branch for the Worker package directory.

The three workers in this repo now follow this pattern:

- edge-preview-authenticated-proxy
- format-errors
- playground-preview-worker

In addition, the Playground Preview Worker has end-to-end tests that are run on every push to the `main` branch, and also any PRs that have the "playground-worker" label.
For these tests the Worker is deployed to the testing environment before running the tests against this deployment.

* C3: bump `create-next-app` and handle new `next.config.mjs` defaults (#4863)

* bump create-next-app from 14.0.4 to 14.1.0

* C3: handle new next.config.mjs default files

* [wrangler] Support ai bindings in getBindingsProxy (#4869)

* Retain AI service binding from miniflare options

* Update changeset

* chore: bump `workerd` to `1.20240129.0` (#4874)

* [C3] Bump create-vue from 3.9.1 to 3.9.2 in /packages/create-cloudflare/src/frameworks (#4870)

* [C3] Bump create-vue in /packages/create-cloudflare/src/frameworks

Bumps [create-vue](https://github.com/vuejs/create-vue) from 3.9.1 to 3.9.2.
- [Release notes](https://github.com/vuejs/create-vue/releases)
- [Commits](vuejs/create-vue@v3.9.1...v3.9.2)

---
updated-dependencies:
- dependency-name: create-vue
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* Exclude standardPricingWarning from dryrun (#4880)

* Exclude standardPricingWarning from dryrun

That way we do not need authentication for dryrun, again.

* fixup! Exclude standardPricingWarning from dryrun

* fixup! Exclude standardPricingWarning from dryrun

---------

Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>

* Implements Python support in miniflare. (#4873)

* Fix changesets (#4885)

* fix dario-piotrowicz's changesets

* fix existing C3 changesets and amend the changeset text in the creation logic

* Version Packages (#4854)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Bump create-qwik from 1.4.2 to 1.4.3 in /packages/create-cloudflare/src/frameworks (#4881)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.3/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [wrangler] fix: listen on loopback for wrangler dev port check and login (#4830)

The `wrangler dev` port availability check triggers a firewall prompt on
macOS while it briefly opens and closes listeners. The OAuth callback
server from `wrangler login` has the same issue.

Fix both cases by listening on the loopback address only by default.

Fixed some new test failures by using locally available IP addresses:

    wrangler:test:   ● wrangler dev › ip › should use to `ip` from `wrangler.toml`, if available
    wrangler:test:     listen EADDRNOTAVAIL: address not available 1.2.3.4:8787
    wrangler:test:
    wrangler:test:   ● wrangler dev › ip › should use --ip command line arg, if provided
    wrangler:test:     listen EADDRNOTAVAIL: address not available 5.6.7.8:8787

Relates to #4430

* remove outdated and no longer valid miniflare development section from CONTRIBUTING.md (#4893)

* [C3] Bump @angular/create from 17.1.1 to 17.1.2 in /packages/create-cloudflare/src/frameworks (#4892)

* [C3] Bump @angular/create in /packages/create-cloudflare/src/frameworks

Bumps [@angular/create](https://github.com/angular/angular-cli) from 17.1.1 to 17.1.2.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Changelog](https://github.com/angular/angular-cli/blob/main/CHANGELOG.md)
- [Commits](angular/angular-cli@17.1.1...17.1.2)

---
updated-dependencies:
- dependency-name: "@angular/create"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* [Stream] WebRTC Template Improvements (#4157)

* Add port numbers to fix stackblitz automatic startup

* Pull the variables up and show clear instructions

* fixup! Pull the variables up and show clear instructions

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>

* fix: return 4xx error from playground preview worker on invalid tokens (#4904)

Previously, we were passing user-controllable token inputs
(`X-CF-Token` header, `user` search param, `token` cookie) directly to
the `DurableObjectNamespace#idFromString()` function. This validated
the token to be a valid Durable Object ID, but threw a reportable
`TypeError`, generating a 500 response and increasing the errored
request count. This is a user error, so shouldn't be reported. This
change wraps calls to `idFromString()` inside `try`/`catch`es, and
re-throws non-reportable user errors that generate 4xx responses.
We could just validate that the tokens were 64 hex digits before
calling `idFromString()`, but this approach ensures the IDs are for
the `UserSession` object by validating the signature encoded in the
ID too.

* chore: rename deprecated Vitest `TestContext.meta` properties to `TestContext.task` (#4897)

This is a precursor to updating to latest Vitest.

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886) (#4877)

* [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* fixup! [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* Update .changeset/hip-files-count.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

* !fixup: [wrangler] fix: stop rebuild attempts when sources are missing (#3886)

---------

Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [C3] Bump create-remix from 2.5.1 to 2.6.0 in /packages/create-cloudflare/src/frameworks (#4903)

* [C3] Bump create-remix in /packages/create-cloudflare/src/frameworks

Bumps [create-remix](https://github.com/remix-run/remix/tree/HEAD/packages/create-remix) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/remix-run/remix/releases)
- [Changelog](https://github.com/remix-run/remix/blob/main/packages/create-remix/CHANGELOG.md)
- [Commits](https://github.com/remix-run/remix/commits/create-remix@2.6.0/packages/create-remix)

---
updated-dependencies:
- dependency-name: create-remix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: ensure that the Pages dev proxy server does not change the Host header (#4888)

* fix: ensure that the Pages dev proxy server does not change the Host header

Previously, when configuring `wrangler pages dev` to use a proxy to a 3rd party dev server,
the proxy would replace the Host header, resulting in problems at the dev server if it was
checking for cross-site scripting attacks.

Now the proxy server passes through the Host header unaltered making it invisible to the
3rd party dev server.

Fixes #4799

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fixup! fix: ensure that the Pages dev proxy server does not change the Host header

* fix: fallback to returning stack trace if `format-errors` broken (#4908)

* expose cf object from Miniflare instances (#4905)

* expose cf object from Miniflare instances

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* Add a `ctx` field to the `getBindingsProxy` result (#4922)

* split get-bindings-proxy fixture tests in multiple files

* add ctx to getBindingsProxy

* add ctx tests to get-bindings-proxy fixture

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* fix(d1): intercept and stringify errors thrown in --json mode (#4872)

* fix(d1): intercept and stringify errors thrown in --json mode

* fix: add light parsing on d1 execute error message

* add test

* wip

* implement JsonFriendlyFatalError

* address PR feedback

* fix: don't report invalid `format-errors` input (#4911)

* [D1] Add user friendly D1 validation error messages for `dev --remote` and `deploy` (#4914)

* chore: refactor user friendly errors and add 10063 code handling

* chore: add user friendly error message to deployments

* chore: lint

* chore: cleanup directory

* chore: fix remote error handling

* chore: add patch change set

* chore: move ABORT_ERR logic out of the user friendly error handler

* chore: fix syntax

* Update .changeset/fair-shoes-melt.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [D1] teach wrangler how to fetch insights about D1's queries (#4909)

* [D1] teach wrangler how to fetch insights about D1's queries

* add options for sorting and number of results

* add a means of filtering the datetime geq/leq

* add more options, fix tests

* add wrangler banner, add warning text

* add changeset

* rename last to timePeriod

* use string format over numbers as >1mo's data could be possible

* Update red-icons-flow.md

* make it possible to order by count

* Update red-icons-flow.md

* PR feedback

* Update .changeset/red-icons-flow.md

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* address PR feedback

---------

Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>

* [wrangler] test: fix E2E tests (#4907)

* ci: ensure E2E tests failures not reported as successes

#4458 accidentally left `continue-on-error: true` in the workflow.
This meant that E2E test failures weren't reported as check failures.

* test: remove redundant `deploy.test.ts` E2E test

This test was a strict subset of `deployments.test.ts`, and wasn't
providing any additional value.

* test: remove standard pricing warning from E2E test output

This warning may not be shown if an account has opted-in to standard
pricing. This change normalises output to remove it, meaning tests
can be run on any account, regardless of opt-in state.

* test: update format of writing logs message in E2E tests

* test: use `fallback` instead of `default` in E2E tests

#4571 updated the message logged in non-interactive contexts for
default values to use the word `fallback` instead of `default`.

* fix: ensure `--log-level` argument applied immediately

Some messages were being logged before the `--log-level` argument was
applied. In particular, this meant the "writing logs to" message at
`debug` level, was not output when using `--log-level=debug`.

* test: improve reliability of `dev.test.ts` E2E test

This change makes a few improvements to `dev.test.ts`:

- Shorter timeouts for `fetch()` retries
- Replaces `get-port` with native port `0` implementation
- Waits for stdout handlers to be registered before starting
  `wrangler dev`
- Ignores errors if we failed to find a proccess to kill
  (assumes the process was already killed)

* fix: throw `UserError`s for R2 object/bucket not-found errors

These errors should not be reported to Sentry.

* global install

* Ensure internal workers listen on ipv4 only

* shorter timeouts


---------

Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>

* Python support (#4901)

* Implements wrangler deploy/dev support for Python.

* Migrate to `--no-bundle` approach

* Basic support for `requirements.txt`

* address review comments

* Strip package versions

* Support deploying

* Address comments

* Fix tests

---------

Co-authored-by: Dominik Picheta <dominik@cloudflare.com>

* Version Packages (#4891)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* [C3] Add `getBindingsProxy` support to qwik template (#4927)

* Split package.json update into multiple phases

* Add getBindingsProxy to qwik template

* Add support for testing dev scripts in c3 e2e tests

* Refactor framework e2e verification helpers

* Add support for verifying build script in framework e2es

* Refactor e2e helpers

* Refactor workers e2e tests to re-align with frameworks tests

* Refactor RunnerConfig in e2e tests

* Fixing cli e2e tests

* changeset

* remove leftover test value

* Fix issue with npm tests & fix e2e logging

* Addressing PR feedback

* [playground-preview-worker] fix: don't report invalid upload input (#4937)

* fix: don't report invalid `edge-preview-authenticated-proxy` URLs (#4939)

* [D1] print wrangler banner at the start of every D1 command (#4938)

* fix: make the entrypoint optional for the `types` command (#4931)

---------

Co-authored-by: MrBBot <bcoll@cloudflare.com>

* add a `cf` field to the `getBindingsProxy` result (#4926)


---------

Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>

* Improve DX with `node:*` modules (#4499)

* Turn node build failures into warnings

* Allow files to suppress warnings for specific modules

* Remove comment-based allow-listing

* Add changeset

* Update .changeset/chatty-balloons-impress.md

Co-authored-by: James M Snell <jasnell@gmail.com>

* Pass through `defineNavigatorUserAgent`

* Add tests

* lockfile

* Linting

* fix tests

---------

Co-authored-by: James M Snell <jasnell@gmail.com>

* improve(r2): Update Sippy endpoint request payloads to match new schema (#4928)

* fix(r2): update Sippy API request payloads

* improve(r2): rename sippy flags for clarity

* improve(r2): stricter existence in Sippy

* [C3] Bump create-qwik from 1.4.3 to 1.4.4 in /packages/create-cloudflare/src/frameworks (#4935)

* [C3] Bump create-qwik in /packages/create-cloudflare/src/frameworks

Bumps [create-qwik](https://github.com/BuilderIO/qwik/tree/HEAD/packages/create-qwik) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/BuilderIO/qwik/releases)
- [Commits](https://github.com/BuilderIO/qwik/commits/v1.4.4/packages/create-qwik)

---
updated-dependencies:
- dependency-name: create-qwik
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* [C3] Update frameworks cli dependencies

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>

* fix: allow `port` option to be specified with `unstable_dev()` (#4953)

* Extend error handling of proxy request errors in ProxyWorker (#4867)

* ignore stale proxy errors

* attempt to recover from ProxyWorker fetch errors
by requeuing the request (only if it is GET or HEAD)

* add test

* add changeset

* refactor to flatten nested if-else blocks

* requeue request for retry at front of queue

* sort batch of requests in queue by order of arrival

* Revert "sort batch of requests in queue by order of arrival"

This reverts commit 3329f19.

* Revert "requeue request for retry at front of queue"

This reverts commit f0377b7.

* prioritise requests being retried
over requests being proxied for the first time

* better comments

* update changeset to match recommeded format

* Update five-cooks-share.md (#4956)

* Version Packages (#4934)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Co-authored-by: James Culveyhouse <jculveyhouse@cloudflare.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wrangler automated PR updater <wrangler@cloudflare.com>
Co-authored-by: petero-dk <2478689+petero-dk@users.noreply.github.com>
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com>
Co-authored-by: workers-devprod@cloudflare.com <116369605+workers-devprod@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Peter Wu <peter@lekensteyn.nl>
Co-authored-by: Taylor Smith <tsmith@tsmith.com>
Co-authored-by: Peter Bacon Darwin <pbacondarwin@cloudflare.com>
Co-authored-by: Magnus Dahlstrand <magnusdahlstrand@users.noreply.github.com>
Co-authored-by: Max Rozen <3822106+rozenmd@users.noreply.github.com>
Co-authored-by: Nora Söderlund <norasoderlund@icloud.com>
Co-authored-by: Samuel Macleod <smacleod@cloudflare.com>
Co-authored-by: Dominik Picheta <dominik@cloudflare.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Siddhant <siddhant@cloudflare.com>
Co-authored-by: Rahul Sethi <5822355+RamIdeas@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants