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: move annotations under metadata in create-worker-upload-form #5238

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

RamIdeas
Copy link
Contributor

@RamIdeas RamIdeas commented Mar 13, 2024

What this PR solves / how to test

This fixes annotations in versions upload to match where the api expects to find them

Author has addressed the following

in create-worker-upload-form
@RamIdeas RamIdeas requested a review from a team as a code owner March 13, 2024 17:02
Copy link

changeset-bot bot commented Mar 13, 2024

🦋 Changeset detected

Latest commit: a397bf9

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

annotations: {
"workers/message": props.message,
"workers/tag": props.tag,
"workers/triggered_by": "wrangler",
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove triggered_by while we're here? As this will no longer be overridable soon.

@@ -111,6 +111,7 @@ export interface WorkerMetadata {
placement?: CfPlacement;
tail_consumers?: CfTailConsumer[];
limits?: CfUserLimits;
annotations?: Record<string, string>;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is the single field that's not supported in script upload, but supported in version upload, is it worth calling that out in a comment? Is it fairly awkward to split the types into the set of fields supported by either API?

Copy link
Contributor

github-actions bot commented Mar 14, 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/8281575432/npm-package-wrangler-5238

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.34.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240304.2
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 Mar 14, 2024

Codecov Report

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

Project coverage is 71.45%. Comparing base (03484c2) to head (a397bf9).
Report is 9 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5238      +/-   ##
==========================================
+ Coverage   71.26%   71.45%   +0.18%     
==========================================
  Files         309      309              
  Lines       16075    16081       +6     
  Branches     4105     4103       -2     
==========================================
+ Hits        11456    11490      +34     
+ Misses       4619     4591      -28     
Files Coverage Δ
...src/deployment-bundle/create-worker-upload-form.ts 88.88% <100.00%> (+0.07%) ⬆️
packages/wrangler/src/versions/index.ts 38.46% <ø> (ø)
packages/wrangler/src/versions/list.ts 77.41% <100.00%> (+0.37%) ⬆️
packages/wrangler/src/versions/upload.ts 11.22% <0.00%> (+0.11%) ⬆️

... and 8 files with indirect coverage changes

@petebacondarwin
Copy link
Contributor

Snapshots need updating to accommodate the extra empty line that was added.

@RamIdeas RamIdeas merged commit a0768bc into main Mar 14, 2024
15 checks passed
@RamIdeas RamIdeas deleted the versions-upload-fix branch March 14, 2024 14:20
@petebacondarwin
Copy link
Contributor

I added an issue to track adding the missing tests #5254

@taylorlee taylorlee mentioned this pull request Mar 19, 2024
9 tasks
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