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
tcrespog
reviewed
Feb 24, 2026
…versioning-support
tcrespog
approved these changes
Feb 25, 2026
Contributor
tcrespog
left a comment
There was a problem hiding this comment.
Tested and worked successfully.
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
Contributor
swingingsimian
left a comment
There was a problem hiding this comment.
Only reviewed commands so far, I'll have a 2nd pass at the rest asap.
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
Show resolved
Hide resolved
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
| throw new TowerException("No versions available for the pipeline, check if Pipeline versioning feature is enabled for the workspace"); | ||
| } | ||
|
|
||
| List<PipelineVersionFullInfoDto> versions = response.getVersions().stream() |
Contributor
There was a problem hiding this comment.
This is not how the API works. Listing versions returns full PipelineDbDtos, not just the version meta data. But if we're aiming to replicate an approximation of the UI behaviour, then this is acceptable.
Contributor
Author
There was a problem hiding this comment.
I don't understand.
I know the listing returns full DTOs, that is why we are calling the .stream and mapping to get the metadata only.
src/main/java/io/seqera/tower/cli/commands/pipelines/AbstractPipelinesCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/UpdateCmd.java
Outdated
Show resolved
Hide resolved
…a tests to cover the use case
...in/java/io/seqera/tower/cli/responses/pipelines/versions/ViewPipelineVersionCmdResponse.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/responses/pipelines/PipelinesView.java
Outdated
Show resolved
Hide resolved
src/main/java/io/seqera/tower/cli/commands/pipelines/versions/ListCmd.java
Show resolved
Hide resolved
…ith pipelines view cmd
…ith pipelines view cmd
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 pipeline with version targeting
Verify: The first two show Version Name, Version Is Default, and Version Hash rows. The third shows the default pipeline version.
Test 4: Update non-versionable field (no new version)
Verify: Output says "Pipeline updated" without any new version message.
Test 5: 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 6: 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 6b: 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 7: Rename draft version
Verify: Version updated successfully.
Test 8: Set version as default
Verify: Version updated successfully.
Test 9: Update a specific version by name
Verify: Pipeline updated without creating a new draft.
Test 10: 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 11: Export + import round-trip
Verify: Imported pipeline exists and can be viewed.
Cleanup