Skip to content

feat: add configurable base url to embedded world#227

Closed
eersnington wants to merge 2 commits into
vercel:mainfrom
eersnington:feat/local-world-baseurl-support
Closed

feat: add configurable base url to embedded world#227
eersnington wants to merge 2 commits into
vercel:mainfrom
eersnington:feat/local-world-baseurl-support

Conversation

@eersnington
Copy link
Copy Markdown
Contributor

@eersnington eersnington commented Nov 5, 2025

Hey @Schniz, I was wondering if I can introduce changes to the world spec, specifically local world spec to allow users to configure base URL for queue streams.

Here's the reference issue #201 (comment) where a user had --experimental-https flag enabled but could get workflows to start cause the queue requests hard codes "http" as protocol. I think it would massively improve the DX if users can configure the base URL through either a config or Env vars because the current workaround is hacky at best.

The PR is draft and not complete at all ATM (haven't tested too). I want to introduce changes so the following are possible with local world:

  • Call createEmbeddedWorld({}) with no env overrides to use .workflow-data and http://localhost:3000
  • Pin the listener port only: createEmbeddedWorld({ port: 4010 }) -> queue hits http://localhost:4010
  • Ephemeral ports for tests: createEmbeddedWorld({ port: 0 })
  • Supply a full base URL so calls reach a proxy: createEmbeddedWorld({ baseUrl: 'https://example.com/workflow-proxy' }) (path kept, trailing slash trimmed)
  • Or through an Env vars:
WORKFLOW_BASE_URL=https://world.acme.com/workflow
WORKFLOW_EMBEDDED_DATA_DIR=/var/run/workflow
PORT=5000

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Nov 5, 2025

⚠️ No Changeset found

Latest commit: b7840d6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Nov 5, 2025

@eersnington is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

@eersnington
Copy link
Copy Markdown
Contributor Author

eersnington commented Nov 5, 2025

⚠️ No Changeset found

Latest commit: 09a465c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

will add this at the end if Gal approves of this idea or if this will interfere with any other plans of his

Copy link
Copy Markdown
Contributor

@vercel vercel Bot left a comment

Choose a reason for hiding this comment

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

Comment thread packages/world-local/src/index.ts
also added sourceURL which might come in handy for better errors

Signed-off-by: Sree Narayanan <sreeaadhi07@gmail.com>
@eersnington
Copy link
Copy Markdown
Contributor Author

@workflow/world-local:build
@workflow/core:test
cache miss, executing 083efc37933e9dd9
 @workflow/core@4.0.1-beta.9 test D:\a\workflow\workflow\packages\core
  WORKFLOW_TARGET_WORLD=embedded vitest run src
 'WORKFLOW_TARGET_WORLD' is not recognized as an internal or external command,
operable program or batch file.


 Looks like the Windows unit tests is failing due to windowisms. iirc, you set an env var in windows with "set"

@eersnington
Copy link
Copy Markdown
Contributor Author

#260

beat me to it

TooTallNate added a commit that referenced this pull request Apr 17, 2026
v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.
TooTallNate added a commit that referenced this pull request Apr 17, 2026
#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.
TooTallNate added a commit that referenced this pull request May 4, 2026
#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.
TooTallNate added a commit that referenced this pull request May 4, 2026
…#1913)

* ci: upgrade pnpm/action-setup to v5 and read version from package.json (#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.

* ci: stop using Release App token in release workflows (#1866)

The Release App has been temporarily removed. Switch the Release and
Backport workflows to use the default GITHUB_TOKEN, and disable the
cross-repo Front dispatch workflow until the App is restored.

Also add a workflow_dispatch trigger to release.yml so the Version
Packages PR can be created/updated manually (since pushes made by
GITHUB_TOKEN do not trigger downstream workflow runs).

* ci: use GitHub API commit mode for changesets action (#1867)

The repo enforces "Commits must have verified signatures" via an
org/enterprise-level ruleset, which blocks unsigned commits pushed via
the Git CLI by GITHUB_TOKEN. Switching the changesets action to
commitMode: github-api makes commits GPG-signed by GitHub.

* Add changeset for backport

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
TooTallNate added a commit that referenced this pull request May 4, 2026
…#1918)

* ci: upgrade pnpm/action-setup to v5 and read version from package.json (#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.

* ci: stop using Release App token in release workflows (#1866)

The Release App has been temporarily removed. Switch the Release and
Backport workflows to use the default GITHUB_TOKEN, and disable the
cross-repo Front dispatch workflow until the App is restored.

Also add a workflow_dispatch trigger to release.yml so the Version
Packages PR can be created/updated manually (since pushes made by
GITHUB_TOKEN do not trigger downstream workflow runs).

* ci: use GitHub API commit mode for changesets action (#1867)

The repo enforces "Commits must have verified signatures" via an
org/enterprise-level ruleset, which blocks unsigned commits pushed via
the Git CLI by GITHUB_TOKEN. Switching the changesets action to
commitMode: github-api makes commits GPG-signed by GitHub.

* Add changeset for backport

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.

1 participant