Open
Conversation
…t versions are created after updates
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
tcrespog
reviewed
Feb 20, 2026
src/main/java/io/seqera/tower/cli/commands/pipelines/versions/ListCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/versions/ListCmd.java
Outdated
Show resolved
Hide resolved
...n/java/io/seqera/tower/cli/responses/pipelines/versions/ListPipelineVersionsCmdResponse.java
Show resolved
Hide resolved
src/test/java/io/seqera/tower/cli/pipelines/PipelineVersionsCmdTest.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pipelines versionssubcommand group (list,view,update) to manage pipeline versions--version-id/--version-nameinto existing commands:pipelines view,pipelines export,pipelines update, andlaunchpipelines addgains--version-nameto name the initial version on creationpipelines updatedetects when a versionable field change creates a new version: auto-generates a name (mirroring the frontend naming algorithm), assigns it, and promotes it to default. Use--allow-draftto skip auto-naming and keep the new version as an unnamed draft for manual management.pipelines viewdisplays version info (name, default flag, hash) when a version is specifiedpipelines exportincludes the version name in the exported JSON so it survives import round-tripspipelines labelscommands into alabels/sub-package mirroring theversions/structureTest plan
./gradlew test— all unit tests passTOWER_CLI=./build/native/nativeCompile/tw ./gradlew test— all unit tests pass in binary modeTesting guidelines
Setup
Test 1: Create pipeline with initial version name
Verify: Pipeline is created successfully.
Test 2: List versions
Verify: All list variants return v1.0 as the single published version.
Test 3: View version by name and by ID
Verify: Both show version details (ID, name, hash, default flag, creator, timestamps).
Test 4: View pipeline with version targeting
Verify: The first two show Version Name, Version Is Default, and Version Hash rows. The third (no version) omits version info.
Test 5: Update non-versionable field (no new version)
Verify: Output says "Pipeline updated" without any new version message.
Test 6: Update versionable field (auto-names and promotes new version)
Verify: Output says "Pipeline updated" followed by "New version 'v1.0-1' created and set as default, available in the Launchpad." (name is derived from the current default version name).
Test 7: Confirm auto-named version appears in version list
Verify: Two published versions shown — v1.0 and v1.0-1 (or similar). The new one is marked as default.
Test 7b: Update versionable field with --allow-draft (keeps unnamed draft)
Verify:
DRAFT_IDis a non-null version ID. Output includes "New draft version created" message.Test 8: Rename draft version
Verify: Version updated successfully.
Test 9: Set version as default
Verify: Version updated successfully.
Test 10: Update a specific version by name
Verify: Pipeline updated without creating a new draft.
Test 11: Export with version targeting
Verify: The first two include
"version": {"name": "v1.0"}in the JSON. The third (default version) omits the version field.Test 12: Export + import round-trip
Verify: Imported pipeline exists and can be viewed.
Cleanup