Skip to content

ci: create Nexus endpoints up front for Cloud tests - #2529

Draft
THardy98 wants to merge 3 commits into
mainfrom
codex/probe-cloud-nexus-endpoint
Draft

THardy98 wants to merge 3 commits into
mainfrom
codex/probe-cloud-nexus-endpoint

Conversation

@THardy98

@THardy98 THardy98 commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

  • Endpoint manifest: packages/test/src/nexus-endpoint-manifest.ts lists the task queue of every test that calls registerNexusEndpoint(), grouped by test file name (including suffixes such as .cloud-unavailable). registerNexusEndpoint() fails for a task queue missing from it, so local runs catch new or renamed tests.
  • Endpoint creation: a new nexus-endpoints <namespace> command in .github/scripts/cloud-namespace.ts creates one endpoint per task queue of the Cloud-eligible test files. Each name is <namespace name>-<hash of task queue>. It then calls each endpoint until it responds (every 200ms, up to 3 min) and waits 30s more, as the Nexus team's own Cloud tests do.
  • Tests: on Cloud (TEMPORAL_TEST_NEXUS_ENDPOINT_PREFIX set), registerNexusEndpoint() returns the pre-created endpoint's name instead of creating one. Local behavior is unchanged.
  • Cleanup: the delete step removes the run's endpoints, then the namespace. Creation also removes sdk-typescript-ci-* endpoints whose namespace no longer exists, left behind by runs that died before cleanup.
  • Removed redundant deleteNexusEndpoint calls from test-nexus-workflow-caller; the helper's teardown already deletes the endpoint.
  • test-integration-extstore-nexus now runs on Cloud, as the first Nexus suite.

Why?

The Nexus suites are .cloud-unavailable because they create endpoints through the OperatorService, which Cloud rejects. Cloud manages endpoints through the Cloud Ops API instead, and new endpoints take minutes to become callable. So tests can't create their own, and we create them all once per run.

Endpoints are per-run because each one routes to a single namespace and task queue, and every run has its own namespace. Over Oct 7-13, 101 of 116 Cloud jobs overlapped another, so endpoints shared between runs would collide on task queues.

How was this tested?

  • Locally, the 10 Nexus suites pass through the new helper, except query Nexus operation attaches the response link..., which fails the same way on main.
  • The readiness check passed against a local dev server with 3 endpoints.
  • New unit tests cover endpoint naming and the manifest rules.
  • On Cloud (run 38417024597), endpoint creation, readiness and cleanup all passed. All 26 endpoints answered on their first or second call, within 0.3-21s, and the step took 96s including the 30s settle. That run created 22 extra endpoints because of a manifest key collision, fixed in the follow-up commit.

Follow-ups

  • Move the remaining Nexus suites to Cloud by dropping .cloud-unavailable and renaming the suite's manifest key to match (the manifest check flags a stale key locally). Several need account dynamic config first.
  • Confirm the account's MaxNexusEndpoints before about 85 endpoints per run times concurrent runs exceeds it.

🤖 Generated with Claude Code

TEMPORARY, not for merge. Creates and deletes one Nexus endpoint through the
Cloud Ops API in the Cloud job, logging whether the CI API key is permitted to.
Nexus suites can only run against Cloud if endpoints can be created this way,
since Cloud rejects the OperatorService.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@THardy98 THardy98 added the skip-changelog No changelog is necessary for this PR. label Oct 12, 2026
THardy98 and others added 2 commits October 13, 2026 10:30
Temporal Cloud only manages Nexus endpoints through the Cloud Ops API, and new
endpoints take minutes to become callable, so tests cannot create their own.

- List the task queue of every test that calls registerNexusEndpoint() in a
  checked-in manifest. registerNexusEndpoint() fails for a missing entry, so
  local runs catch new or renamed tests.
- Add a `nexus-endpoints` command to cloud-namespace.ts. It creates one
  endpoint per task queue of the Cloud-eligible test files, named after the
  run's namespace, then calls each endpoint until it responds and waits 30s
  more, as the Nexus team's own Cloud tests do.
- On Cloud, registerNexusEndpoint() returns the pre-created endpoint's name.
- The delete step removes the run's endpoints before the namespace, and
  creation removes endpoints leaked by runs that died before cleanup.
- Remove redundant endpoint deletion from test-nexus-workflow-caller; the
  helper's teardown already deletes the endpoint.
- Run test-integration-extstore-nexus on Cloud as the first Nexus suite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@THardy98 THardy98 changed the title [DO NOT MERGE] ci: probe Cloud Nexus endpoint permissions ci: create Nexus endpoints up front for Cloud tests Oct 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog No changelog is necessary for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant