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

Fix Workers AI local mode fetcher not returning headers to client worker #5138

Merged
merged 6 commits into from
Mar 4, 2024

Conversation

G4brym
Copy link
Member

@G4brym G4brym commented Mar 1, 2024

What this PR solves / how to test

Fixes Workers AI local mode fetcher not returning headers to client worker

Author has addressed the following

  • Tests
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Not necessary because: this is a small bug fix and this code already has testing coverage

@G4brym G4brym requested a review from a team as a code owner March 1, 2024 18:23
Copy link

changeset-bot bot commented Mar 1, 2024

🦋 Changeset detected

Latest commit: ee2da8c

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

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@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

@G4brym G4brym force-pushed the fix-workers-ai-local-fetcher branch from d01eb2a to 3528f1f Compare March 2, 2024 15:02
packages/wrangler/src/ai/fetcher.ts Outdated Show resolved Hide resolved
.changeset/yellow-phones-buy.md Outdated Show resolved Hide resolved
@G4brym G4brym force-pushed the fix-workers-ai-local-fetcher branch from 3528f1f to 1489650 Compare March 4, 2024 10:28
Copy link
Contributor

github-actions bot commented Mar 4, 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/8138819560/npm-package-wrangler-5138

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.30.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240223.0
workerd 1.20240223.1 1.20240223.1
workerd --version 1.20240223.1 2024-02-23

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

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

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

Project coverage is 70.33%. Comparing base (9d1d11c) to head (ee2da8c).
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #5138   +/-   ##
=======================================
  Coverage   70.32%   70.33%           
=======================================
  Files         298      298           
  Lines       15542    15546    +4     
  Branches     3999     4000    +1     
=======================================
+ Hits        10930    10934    +4     
  Misses       4612     4612           
Files Coverage Δ
packages/wrangler/src/ai/fetcher.ts 25.00% <20.00%> (-8.34%) ⬇️

... and 6 files with indirect coverage changes

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.

We don't currently test Workers AI in workers-sdk, as it requires real account credentials and we're concerned about hitting rate limits, so approving this without tests. 👍

@mrbbot mrbbot merged commit 3dd9089 into cloudflare:main Mar 4, 2024
17 checks passed
@workers-devprod workers-devprod mentioned this pull request Mar 4, 2024
@G4brym G4brym deleted the fix-workers-ai-local-fetcher branch March 4, 2024 11:33
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