Skip to content

fix: explain an unknown flag from a step's additional arguments - #295

Merged
matt-richardson merged 1 commit into
ap/default-to-new-clifrom
mr/go-cli-legacy-arguments
Oct 29, 2026
Merged

matt-richardson merged 1 commit into
ap/default-to-new-clifrom
mr/go-cli-legacy-arguments

Conversation

@matt-richardson

@matt-richardson matt-richardson commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Merges into #276.

A step's additional command line arguments reach the Go CLI unchanged. Steps written for the legacy octo CLI can carry arguments it doesn't have, such as --progress, --waitForDeployment or --packageVersion. After upgrading, those steps fail with only Error: unknown flag: --progress, which doesn't say that the argument came from the step's own settings. When a command fails with an unknown flag and the step has additional arguments, the build log now says so and points at octopus <command> --help.

Notes:

  • The legacy arguments are not translated. Their names and meanings differ enough from the Go CLI's that a silent rewrite could change what a step does.
  • --deployTo on a Create release step is already rejected by the step's validation. TeamCity also runs that validation when it matches a build to an agent (see fix: require an Octopus space instead of falling back to Default #287), so a saved step with --deployTo stays queued with the reason in the agent's compatibility details rather than reaching the CLI.
  • /flag forms, which octo accepted, are positional arguments to the Go CLI and fail with a different error. This hint doesn't cover them.
  • feat!: Remove legacy CLI and default new Go CLI #276's release notes should mention that additional arguments need rewriting for the Go CLI.

🤖 Generated with Claude Code

Additional command line arguments reach the Go CLI unchanged. Steps
written for the legacy octo CLI can carry arguments the Go CLI rejects
with only "unknown flag"; the build log now says where the argument
came from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Oct 28, 2026
@matt-richardson
matt-richardson marked this pull request as ready for review October 29, 2026 23:37
@matt-richardson
matt-richardson merged commit 9aa9a61 into ap/default-to-new-cli Oct 29, 2026
6 checks passed
@matt-richardson
matt-richardson deleted the mr/go-cli-legacy-arguments branch October 29, 2026 23:43
APErebus added a commit that referenced this pull request Nov 5, 2026
* Remove legacy CLI and default new Go CLI

* Continue fixing

* Linting

* Fix test

* fix: refuse to save a Deploy release step whose release number is latest (#286)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs: update docs to remove old CLI references (#290)

* fix: refuse to save a Create release step with --deployTo in its arguments (#289)

* fix: use the bundled Go CLI whatever octopus_version a step carries (#288)

* test: drop the OCTOPUS_NEW_CLI switch from the e2e tests (#293)

* docs: describe the retry and error classifier for a single CLI (#297)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix: explain an unknown flag from a step's additional arguments (#295)

Additional command line arguments reach the Go CLI unchanged. Steps
written for the legacy octo CLI can carry arguments the Go CLI rejects
with only "unknown flag"; the build log now says where the argument
came from.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* fix: mark agents without a bundled Go CLI as incompatible (#294)

The Go CLI is bundled for amd64 and arm64 only. Every runner reported
every agent as compatible, so a build could be sent to an agent whose
JVM architecture has no bundled CLI and fail when the step started.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Matt Richardson <matt.richardson@octopus.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants