Skip to content

fix(launch): stop launch --wait duplicate runs and support API 1.230 options [COMP-2645] - #701

Merged
cristianrcv merged 7 commits into
masterfrom
fix/COMP-2645-tw-api-1.230
Oct 7, 2026
Merged

cristianrcv merged 7 commits into
masterfrom
fix/COMP-2645-tw-api-1.230

Conversation

@cristianrcv

@cristianrcv cristianrcv commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two parts, on top of master (which already has SDK 1.233.0 from #706):

  1. COMP-2645 fix: tw launch --wait exited 1 after a successful submit when a single status poll failed (a transient 4xx/5xx, or a status the SDK doesn't know). Automation then retried and launched duplicate runs.
  2. API 1.230 options that build on master alone.

Changes

launch --wait fix

  • A failed poll or an unrecognised status keeps polling with the existing backoff.
  • Polling gives up only on 401/403/404, or after 10 minutes of failed polls. It then exits with code 3, not 1, and prints the run id and a tw runs view hint.
  • UNKNOWN is treated as a failed poll.
  • The compute-env and studio waits share the same loop.

API 1.230 features

  • --fusion-version on launch, pipelines add/update, runs relaunch and actions add/update.
  • credentials federation-setup -p aws|google.
  • azure-cloud --key-vault-url (COMP-2043) and google-cloud --billing-export-table (COMP-2502).

Moved out

JIRA

COMP-2645 (related: COMP-2644)

Verification

🤖 Generated with Claude Code

@cristianrcv
cristianrcv added this pull request to stack #704 October 5, 2026 16:12
@cristianrcv
cristianrcv requested a review from jonmarti October 5, 2026 16:18
@cristianrcv
cristianrcv removed this pull request from stack #704 October 5, 2026 16:20
@cristianrcv
cristianrcv added this pull request to stack #705 October 5, 2026 16:20
@cristianrcv
cristianrcv removed this pull request from stack #705 October 7, 2026 13:26
@cristianrcv
cristianrcv force-pushed the fix/COMP-2645-tw-api-1.230 branch from df53985 to c2728fe Compare October 7, 2026 13:39
@cristianrcv
cristianrcv changed the base branch from feat/NOTASK-tw-api-1.200 to master October 7, 2026 13:39
@cristianrcv cristianrcv changed the title fix: bump tower-java-sdk to 1.230.0, support API 1.230 features and stop launch --wait duplicate runs [COMP-2645] fix(launch): stop launch --wait duplicate runs and support API 1.230 options [COMP-2645] Oct 7, 2026
@cristianrcv
cristianrcv requested a review from a team October 7, 2026 13:44
@cristianrcv
cristianrcv force-pushed the fix/COMP-2645-tw-api-1.230 branch from c2728fe to 37b345a Compare October 7, 2026 13:50
cristianrcv and others added 6 commits October 7, 2026 17:41
…OMP-2645]

tw launch --wait exited 1 after a successful submit when a single
describeWorkflow poll failed: checkWorkflowStatus turned any ApiException
into null, waitStatus mapped null past every target, and the loop ended
as [ERROR]. An unknown status value threw ProcessingException, which
escaped as "Connection error". Automation that retries on a non-zero
exit then launched the pipeline again while the first run kept going,
duplicating runs and compute spend. A single transient 400/5xx was
enough, e.g. during the 2026-10-01 Cloud DB pool exhaustion.

waitStatus now polls a Callable. A failed poll or an unrecognized
status keeps polling with the existing backoff. It gives up only on
401/403/404 or after polls have kept failing for 10 minutes, and then
throws StatusCheckFailedException, which exits with code 3 instead of 1.
A run in UNKNOWN status is treated as a failed poll, since Platform lost
contact but the run may still be running. Launch reports the run id and
a tw runs view hint. Exit 1 is now only for runs that actually ended in
another end state. The compute-env add/delete and studio waits share
the same loop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
WorkflowLaunchRequest gained fusionVersion in API 1.230.0 (Component
Compatibility Catalog, COMP-2121), but it could not be set from the CLI.
It is the Fusion version to run the workflow with; it must exist in the
Platform catalog and only applies when the compute environment enables
Fusion v2.

--fusion-version is JsonNullable on the request, so it joins
NullableLaunchOptions and is applied only when given, in launch,
pipelines add|update, actions add|update and runs relaunch; the guard
test covers it automatically. A stored value is inherited by pipelines
update and runs relaunch through ModelHelper's JSON copy; the tests now
assert that.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
API 1.230 added GET /credentials/federation-setup, which returns the
values an administrator must configure in AWS or Google Cloud before
creating workload identity credentials: the Platform public address,
audience and the OIDC subject claims Platform mints for the workspace.
tw added workload identity credentials in e6a8fb9 but users had no way
to get these values from the CLI.

Platform switches on 'aws' and 'google' exactly and returns no values
for anything else, so a typo such as '-p AWS' would print 'No setup
values', which reads as nothing to configure. The provider is an enum,
so picocli rejects unknown values.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
AzCloudConfig.keyVaultUrl (API 1.229.0) selects a per-CE Key Vault for
pipeline secrets (COMP-2043). tw never set it, so Azure Cloud secrets
fell back to an installation default that Cloud does not set. Only
Intelligent Compute resolves these secrets, so the option documents
that it is only used with --sched-enabled.

keyVaultUrl is JsonNullable, so it is set only when given: setting null
would send an explicit null.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…2645]

API 1.230.0 added SchedConfig.billingExportTable: the BigQuery table
holding the Cloud Billing export, which enables cost reporting for an
Intelligent Compute CE. tw could not set it. Platform rejects it on
other providers, so only google-cloud exposes the option, matching the
tower-web form.

billingExportTable is JsonNullable, so it is set only when given:
setting null would send an explicit null.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
--fusion-version, the azure-cloud Key Vault and google-cloud billing table options, credentials federation-setup, and the new launch --wait exit code.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…s [COMP-2645]

Entries for the federation-setup command and response, taken from a full test run under the GraalVM tracing agent. Response classes register allDeclaredFields, since Jackson serializes every field for -o json.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@cristianrcv
cristianrcv force-pushed the fix/COMP-2645-tw-api-1.230 branch from 37b345a to 1edf7ec Compare October 7, 2026 15:44
@cristianrcv
cristianrcv merged commit 295d1a5 into master Oct 7, 2026
12 checks passed
@cristianrcv
cristianrcv deleted the fix/COMP-2645-tw-api-1.230 branch October 8, 2026 09:09
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