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

update non-versioned script settings in versions deploy #5366

Merged
merged 4 commits into from
Mar 26, 2024

Conversation

RamIdeas
Copy link
Contributor

@RamIdeas RamIdeas commented Mar 25, 2024

What this PR solves / how to test

CR: https://jira.cfdata.org/browse/CR-850334

Adds a PATCH call after a wrangler versions deploy to save settings which could not be included in wrangler versions upload but are specified in wrangler.toml and expected by users to be saved upon regular wrangler deploy.

Author has addressed the following

Copy link

changeset-bot bot commented Mar 25, 2024

🦋 Changeset detected

Latest commit: 09481e3

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

Copy link
Contributor

github-actions bot commented Mar 25, 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/8439966721/npm-package-wrangler-5366

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.38.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240320.0
workerd 1.20240320.1 1.20240320.1
workerd --version 1.20240320.1 2024-03-20

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

@RamIdeas RamIdeas marked this pull request as ready for review March 25, 2024 20:42
@RamIdeas RamIdeas requested a review from a team as a code owner March 25, 2024 20:42
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

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

Project coverage is 72.39%. Comparing base (7d160c7) to head (09481e3).
Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5366      +/-   ##
==========================================
+ Coverage   72.29%   72.39%   +0.10%     
==========================================
  Files         318      320       +2     
  Lines       16458    16611     +153     
  Branches     4201     4250      +49     
==========================================
+ Hits        11898    12026     +128     
- Misses       4560     4585      +25     
Files Coverage Δ
...ckages/wrangler/src/__tests__/helpers/msw/index.ts 100.00% <ø> (ø)
...kages/wrangler/src/utils/render-labelled-values.ts 100.00% <100.00%> (ø)
packages/wrangler/src/versions/deploy.ts 93.13% <100.00%> (+0.78%) ⬆️
...ler/src/__tests__/helpers/msw/handlers/versions.ts 92.30% <66.66%> (-7.70%) ⬇️
packages/wrangler/src/versions/api.ts 91.66% <50.00%> (-8.34%) ⬇️

... and 21 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.

Looks good. Is this working around a bug in the create deployment API? Feels like these should be specified there for atomic updates.

packages/wrangler/src/versions/api.ts Outdated Show resolved Hide resolved
@RamIdeas
Copy link
Contributor Author

Looks good. Is this working around a bug in the create deployment API? Feels like these should be specified there for atomic updates.

It's not working around a bug. There are two settings that can't go in the version upload: "logpush" and "tail_consumers" – we're setting those on versions deploy instead.

@RamIdeas RamIdeas merged commit e11e169 into main Mar 26, 2024
17 checks passed
@RamIdeas RamIdeas deleted the versions-script-settings branch March 26, 2024 18:04
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

2 participants