Skip to content

Provision isolated Cloud namespaces for SDK tests - #3032

Draft
THardy98 wants to merge 1 commit into
feat/envconfig-harnessfrom
feat/cloud-test-namespace
Draft

Provision isolated Cloud namespaces for SDK tests#3032
THardy98 wants to merge 1 commit into
feat/envconfig-harnessfrom
feat/cloud-test-namespace

Conversation

@THardy98

Copy link
Copy Markdown
Contributor

What was changed?

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

The Cloud job runs the existing workflow smoke test through the envconfig-backed harness using the generated client certificate. The Cloud Operations client check targets the same namespace using the account API key. Namespace cleanup runs after test or provisioning failures when creation returned a namespace; cleanup failures are reported as warnings with the namespace name.

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 single smoke test. Per-run namespaces prevent concurrent CI runs from sharing workflow state and provide an explicit cleanup boundary without relying on long-lived client credentials.

Breaking changes?

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

Server PR

None.

How was this tested?

  • ./gradlew :temporal-sdk:test --tests 'io.temporal.client.CloudTestNamespaceManagerTest' (7 tests passed)
  • ./gradlew :temporal-sdk:tasks --all
  • actionlint .github/workflows/ci.yml
  • ./gradlew spotlessApply
  • git diff --check

The full local temporal-sdk run completed 1,705 tests successfully and reproduced one unrelated failure in AsyncPollerTest#testSuspendPolling; CI will provide the clean-environment regression result.

Operational notes

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

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