Skip to content

feat: Add studios update command#607

Merged
georgi-seqera merged 15 commits intomasterfrom
feat/add-studio-update-command
Apr 17, 2026
Merged

feat: Add studios update command#607
georgi-seqera merged 15 commits intomasterfrom
feat/add-studio-update-command

Conversation

@georgi-seqera
Copy link
Copy Markdown
Contributor

@georgi-seqera georgi-seqera commented Apr 15, 2026

Summary

Closes: PLAT-4898

  • Add a new studios update CLI command that updates studio properties (configuration, description, labels, name) without starting the studio
  • Uses the new StudiosApi.updateDataStudio() endpoint (PUT /studios/{sessionId}) from tower-java-sdk 1.130.0 (Platform version 26.1.0)
  • Supports the same configuration overrides as the start command: --gpu, --cpu, --memory, --lifespan, --mount-data, --description, --labels, plus a --new-name option for renaming

Usage examples

  # Update a studio by ID (no-op, just re-sends current config)                                                                                                                 
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id>                                                                                                                       
                                                                                                                                                                                
  # Update a studio by name                                                                                                                                                     
  tw studios update -w <org>/<workspace> -n "my-studio"                                                                                                                         
                                                                                                                                                                                
  # Override CPU and memory                                                                                                                                                     
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id> --cpu 4 --memory 16384                                                                                                
                                                                                                                                                                                
  # Change description                                                                                                                                                          
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id> --description "Updated description"                                                                                   
                                                                                                                                                                            
  # Rename a studio
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id> --new-name "new-studio-name"                                                                                          
                                                                                                                                                                                
  # Set lifespan and labels                                                                                                                                                     
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id> --lifespan 24 --labels "owner=jack,env=dev"                                                                           
                                                                                                                                                                                
  # Combined: rename, change config, update labels                                                                                                                              
  tw studios update -w TOWER_WORKSPACE_ID -i <session-id> \                                                                                                                     
    --new-name "renamed-studio" \                                                                                                                                               
    --cpu 8 --memory 32768 --gpu 1 --lifespan 48 \                                                                                                                              
    --description "Production studio" \                                                                                                                                         
    --labels "team=data,env=prod" 

ramonamela and others added 14 commits April 10, 2026 12:14
- WIF (Workload Identity Federation) support for Google credentials
  with --mode=workload-identity, --service-account-email,
  --workload-identity-provider, and --token-audience options
- Network tags (--network-tags) with VPC requirement and GCP format
  validation, plus --network and --subnetwork options
- Machine type selection: --head-job-machine-type (single) and
  --compute-jobs-machine-type (comma-separated list with wildcard
  support), mutually exclusive with instance templates
- Boot disk image (--boot-disk-image) with format validation for
  projects/*/global/images/*, family paths, and batch-* short names
- Fusion Snapshots (--fusion-snapshots) toggle requiring Fusion v2

All features include CLI validation matching backend/frontend rules.
Code will compile once tower-java-sdk is bumped to include the new
fields on GoogleSecurityKeys and GoogleBatchConfig.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Upgrade tower-java-sdk from 1.114.0 to 1.133.0 to include new fields
  on GoogleSecurityKeys and GoogleBatchConfig
- Add bash integration test script for all COMP-1463 features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Azure Entra (service principal) credentials support (add/update)
- Add managed identity options (head/pool client IDs and resource IDs)
  for both Forge and Manual Azure Batch compute environments
- Add VNet/subnet support (--subnet-id) for private network isolation
- Add dual pool mode (--dual-pool) with separate head and worker pool
  configuration for Forge mode, and --worker-pool for Manual mode
- Add job max wall clock time option (--job-max-wall-clock-time)
- Replace JobCleanupPolicy enum with 3 boolean toggles:
  --delete-jobs-on-completion, --delete-tasks-on-completion,
  --terminate-jobs-on-completion

Note: requires tower-java-sdk bump to >= 1.133.0 for new model fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bump tower-java-sdk from 1.114.0 to 1.133.0 for new Azure Batch
  model fields (managed identity, subnet, dual pool, wall clock time,
  cleanup toggles)
- Add bash integration test script for all new Azure Batch CLI features

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…DK 1.133.0 bump

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix AzBatchConfig.deleteJobsOnCompletion mock response: changed from
  string "on_success" to boolean true after field type change in SDK
- Switch request body matchers from exact string to json() partial
  matching for pipeline and label mocks to handle new serialized fields
  in WorkflowLaunchRequest, AssociatePipelineLabelsRequest, and
  CreateLabelRequest

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eflection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…aalVM reflection

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Simplify test coverage to Forge flows, fix ws_flag ordering so it comes after the subcommand, auto-fill /subnets/default when SUBNET_ID is a VNet ID, and extract cleanup into a standalone clean-azure-batch-test-resources.sh that wipes all test-* compute envs and credentials.

[COMP-1464] [test]
… GraalVM reflection

Register AzBatchForgePlatform inner classes (HeadPoolOptions, WorkerPoolOptions, ManagedIdentityOptions), AzBatchManualPlatform.ManagedIdentityOptions, Azure Entra credential commands/providers, ManageCmd for pipeline versions, plus additional SDK 1.133.0 model classes (Role DTOs, GitHubAppSecurityKeys, DataStudio/Dataset update requests, AzBatchPoolConfig, ValidateUrl) exposed by the native Azure Batch integration tests.

[COMP-1464] [graalvm]
…ed-identity-head-client-id

Align the head-job managed identity client ID flag with its resource-id counterpart so all head/pool option pairs share the same naming scheme (--managed-identity-{head,pool}-{client-id,resource-id}). Applies to both forge and manual AzBatch platforms; AzCloud is left untouched because it has no head/pool split.

Addresses Stefano's review comment on PR #606.

[COMP-1464]
…DK field

Reverting 459650f. The CLI should mirror the API field names; the SDK model AzBatchConfig has managedIdentityClientId (head) alongside managedIdentityHeadResourceId, managedIdentityPoolClientId, managedIdentityPoolResourceId. Renaming the CLI flag to add a 'head' prefix broke that 1:1 mapping. Added a note on the Option description acknowledging the asymmetry is inherited from the SDK.

Audited all other COMP-1464 flags against the tower-java-sdk 1.133.0 AzBatchConfig, AzBatchForgeConfig, AzBatchPoolConfig and AzureEntraKeys models — remaining flags already match their API counterparts (only inverted-boolean idioms like --no-auto-scale / --preserve-resources differ, and those predate COMP-1464).

[COMP-1464]
…ed-identity-head-client-id

Restoring the rename originally applied in 459650f (reverted in d059503). Per reviewer discussion on PR #606, the CLI-side head/pool symmetry (--managed-identity-{head,pool}-{client-id,resource-id}) is clearer for users than strictly mirroring the SDK's asymmetric field names, so prefer the consistent CLI naming even though the underlying API keeps managedIdentityClientId for the head job.

[COMP-1464]
Copy link
Copy Markdown
Contributor

@sabulous sabulous left a comment

Choose a reason for hiding this comment

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

Tested each command, works correctly!

@georgi-seqera georgi-seqera changed the base branch from feat/COMP-1464-add-support-for-new-gcp-and-azure-features to master April 17, 2026 08:30
# Conflicts:
#	src/main/java/io/seqera/tower/cli/commands/computeenvs/platforms/GoogleBatchPlatform.java
#	src/main/java/io/seqera/tower/cli/commands/credentials/providers/GoogleProvider.java
@georgi-seqera georgi-seqera merged commit 65a270c into master Apr 17, 2026
11 checks passed
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.

4 participants