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

feat: add experimental Next.js, with Workers assets, template #6830

Merged
merged 7 commits into from
Sep 26, 2024

Conversation

petebacondarwin
Copy link
Contributor

@petebacondarwin petebacondarwin commented Sep 25, 2024

What this PR solves / how to test

This template uses the new @opennextjs/cloudflare adaptor.
Fixes #000

Author has addressed the following

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

Copy link

changeset-bot bot commented Sep 25, 2024

🦋 Changeset detected

Latest commit: 0a52d29

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

Copy link
Contributor

github-actions bot commented Sep 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/11053171152/npm-package-wrangler-6830

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

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

Or you can use npx with this latest build directly:

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

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


wrangler@3.78.10 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240925.0
workerd 1.20240925.0 1.20240925.0
workerd --version 1.20240925.0 2024-09-25

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

.changeset/quiet-eels-rest.md Show resolved Hide resolved
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

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

LGTM, but we need a feature freeze exemption because technically this is a feature.

It's however an experimental feature with minimal blast radius, so I think this change is very safe to merge, and the reward for doing so is huge (single command to scaffold and deploy next.js apps with opennext adapter to cloudflare").

Asking for the exemption now. Please don't release this change until the exemption is granted.

PS: there is an e2e test failure, it's unclear if it's real or a flake, please take a look.
PS2: could you add a minimal e2e test for this template please? thank you

.changeset/quiet-eels-rest.md Show resolved Hide resolved
main = ".worker-next/index.mjs"

compatibility_date = "2024-08-29"
compatibility_flags = ["nodejs_compat_v2"]
Copy link
Contributor

Choose a reason for hiding this comment

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

with #6821 fixed, could we now drop the _v2 suffix?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Defo!

@IgorMinar
Copy link
Contributor

This feature was now granted an exception from the feature freeze due to high value and low risk, see CR-1000121.

@petebacondarwin
Copy link
Contributor Author

PS2: could you add a minimal e2e test for this template please? thank you

I'll try but so far I have not added e2e tests for any of the experimental templates because I wasn't sure how much I would need to change the machinery.

@petebacondarwin petebacondarwin force-pushed the exprimental-next-c3-template branch 4 times, most recently from e050695 to b6d8ee4 Compare September 26, 2024 10:32
Not only is this unnecessary, the cached does not even get used by the e2e step that follows
(probably because the env vars change) so it adds extra time to these jobs.
@IgorMinar
Copy link
Contributor

Thanks for adding the test, @petebacondarwin. Excellent work!

@petebacondarwin petebacondarwin merged commit 0195621 into main Sep 26, 2024
32 checks passed
@petebacondarwin petebacondarwin deleted the exprimental-next-c3-template branch September 26, 2024 14:00
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.

4 participants