Skip to content

Provision isolated Cloud namespaces for SDK tests - #3032

Open
THardy98 wants to merge 7 commits into
mainfrom
feat/cloud-test-namespace
Open

Provision isolated Cloud namespaces for SDK tests#3032
THardy98 wants to merge 7 commits into
mainfrom
feat/cloud-test-namespace

Conversation

@THardy98

@THardy98 THardy98 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

What was changed?

Cloud CI now creates an isolated Temporal Cloud namespace for each workflow run and attempt. A small test-only Java command uses the SDK's existing Cloud Operations client to create an mTLS namespace, wait for provisioning, and delete it by its current resource version after tests finish.

The Cloud job passes the generated namespace and client certificate to the envconfig-backed harness. It publishes the namespace before waiting for provisioning so cleanup can still run after a partial failure, and namespace deletion runs under always() whenever creation returned a namespace. Cleanup failures fail the job so leaked resources remain visible.

This PR is stacked on #2998 and should be retargeted to main after that harness PR merges.

Why?

The SDK test suite needs an isolated Cloud target before it can safely expand beyond a smoke test. Per-run namespaces prevent concurrent CI runs from sharing workflow state and provide an explicit cleanup boundary without relying on long-lived namespace credentials.

Breaking changes?

None. The namespace command and Gradle tasks are internal test infrastructure.

Server PR

None.

How was this tested?

  • Five focused CloudTestNamespaceManagerTest tests covering namespace specifications, deletion resource versions, operation states, polling delays, and required operation IDs.
  • Full temporal-sdk test task with bounded local workers.
  • actionlint .github/workflows/ci.yml.
  • ./gradlew spotlessApply and git diff --check.

The draft PR's Cloud job provides the end-to-end create, envconfig smoke-test, and delete validation.

Operational notes

TEMPORAL_CLIENT_CLOUD_API_KEY must have account-level permission to create, inspect, and delete namespaces in aws-ca-central-1. Workflow tests authenticate to the ephemeral namespace with the generated mTLS certificate rather than that API key.

@THardy98
THardy98 force-pushed the feat/cloud-test-namespace branch from 80d1c35 to e951a65 Compare August 25, 2026 12:06
@THardy98
THardy98 force-pushed the feat/cloud-test-namespace branch from e951a65 to 21ae1f4 Compare August 25, 2026 17:00
Base automatically changed from feat/envconfig-harness to main September 2, 2026 14:54
@THardy98
THardy98 marked this pull request as ready for review September 2, 2026 15:22
@THardy98
THardy98 requested a review from a team as a code owner September 2, 2026 15:22
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