Skip to content

When running wrangler deploy add a OPEN_NEXT_DEPLOY environment variable to let wrangler know that it is being run by open-next#1023

Merged
vicb merged 7 commits intomainfrom
dario/add-RUN_BY_OEPN_NEXT-env-var
Dec 9, 2025
Merged

When running wrangler deploy add a OPEN_NEXT_DEPLOY environment variable to let wrangler know that it is being run by open-next#1023
vicb merged 7 commits intomainfrom
dario/add-RUN_BY_OEPN_NEXT-env-var

Conversation

@dario-piotrowicz
Copy link
Copy Markdown
Contributor

@dario-piotrowicz dario-piotrowicz commented Dec 3, 2025

This is mostly beneficial just for wrangler deploy with autoconfig, since we're updating wrangler deploy to potentially call opennextjs-cloudflare deploy, the latter calls wrangler deploy so we need to have a mechanism in place for avoiding an infinite recursion in such cases

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 3, 2025

🦋 Changeset detected

Latest commit: bac42c8

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

This PR includes changesets to release 1 package
Name Type
@opennextjs/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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Dec 3, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@opennextjs/cloudflare@1023

commit: bac42c8

Comment thread packages/cloudflare/src/cli/utils/run-wrangler.ts Outdated
@dario-piotrowicz dario-piotrowicz requested a review from vicb December 4, 2025 13:07
Comment thread packages/cloudflare/src/cli/utils/run-wrangler.ts Outdated
@dario-piotrowicz dario-piotrowicz force-pushed the dario/add-RUN_BY_OEPN_NEXT-env-var branch from 07e8e55 to 092f5d1 Compare December 8, 2025 18:05
@dario-piotrowicz dario-piotrowicz changed the title When running wrangler commands add a RUN_BY_OPEN_NEXT environment variable that wrangler can use to detect if it is run by open-next When running wrangler deploy add a OPEN_NEXT_DEPLOY environment variable to let wrangler know that it is being run by open-next Dec 8, 2025
@dario-piotrowicz dario-piotrowicz requested a review from vicb December 8, 2025 18:10
Copy link
Copy Markdown
Contributor

@vicb vicb left a comment

Choose a reason for hiding this comment

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

Thanks Dario!
LGTM with nits

Comment thread packages/cloudflare/src/cli/utils/run-wrangler.ts Outdated
Comment thread packages/cloudflare/src/cli/utils/run-wrangler.ts
dario-piotrowicz and others added 2 commits December 9, 2025 10:36
@vicb vicb merged commit a4a2f02 into main Dec 9, 2025
7 checks passed
@vicb vicb deleted the dario/add-RUN_BY_OEPN_NEXT-env-var branch December 9, 2025 11:40
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