Skip to content

fix(C3): Use today's date for compat date when the latest workerd release date is in the future#7891

Merged
penalosa merged 1 commit intomainfrom
jahands/fix-compat-date
Jan 24, 2025
Merged

fix(C3): Use today's date for compat date when the latest workerd release date is in the future#7891
penalosa merged 1 commit intomainfrom
jahands/fix-compat-date

Conversation

@jahands
Copy link
Copy Markdown
Member

@jahands jahands commented Jan 24, 2025

Fixes an issue where deployments would fail when there is a workerd release on the same day due to workerd releases having a date in the future because Workers does not allow using a compat date in the future.

I found this really frustrating that C3 templates fail to deploy if there is a workerd release on the same day:
image

Describe your change...


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: small change
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bug fix

…ease date is in the future

Fixes an issue where deployments would fail when there is a workerd
release on the same day due to workerd releases having a date in the
future because Workers does not allow using a compat date in the future.
@jahands jahands requested a review from a team January 24, 2025 00:18
@jahands jahands requested a review from a team as a code owner January 24, 2025 00:18
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 24, 2025

🦋 Changeset detected

Latest commit: 9e9ff55

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

This PR includes changesets to release 1 package
Name Type
create-cloudflare 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

const date = await getWorkerdCompatibilityDate();

const fallbackDate = "2023-05-18";
const fallbackDate = "2024-11-11";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Bumped the fallback date while I was here. THis was the latest date I found in https://developers.cloudflare.com/workers/configuration/compatibility-flags/ (not sure if we go off of that or workerd releases for this).

Copy link
Copy Markdown
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@github-actions
Copy link
Copy Markdown
Contributor

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/12940600330/npm-package-wrangler-7891

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-wrangler-7891 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-workers-bindings-extension-7891 -O ./cloudflare-workers-bindings-extension.0.0.0-va793b0b60.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-va793b0b60.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-create-cloudflare-7891 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-kv-asset-handler-7891

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-miniflare-7891

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-pages-shared-7891

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-unenv-preset-7891

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-vite-plugin-7891

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-vitest-pool-workers-7891

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-workers-editor-shared-7891

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-workers-shared-7891

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12940600330/npm-package-cloudflare-workflows-shared-7891

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


wrangler@3.105.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241230.2
workerd 1.20250124.0 1.20250124.0
workerd --version 1.20250124.0 2025-01-24

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

@penalosa penalosa merged commit a7965c7 into main Jan 24, 2025
@penalosa penalosa deleted the jahands/fix-compat-date branch January 24, 2025 11:36
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.

2 participants