Skip to content

fix: open the build log block each step closes, and keep CLI output lines apart - #298

Merged
matt-richardson merged 19 commits into
mainfrom
mr/go-cli-log-block-and-output
Nov 5, 2026
Merged

matt-richardson merged 19 commits into
mainfrom
mr/go-cli-log-block-and-output

Conversation

@matt-richardson

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

Copy link
Copy Markdown
Contributor

Merges into #276.

Two problems in the Go CLI build process. Both were already on main, but only for steps that opted into the Go CLI. With the legacy CLI removed, every Octopus step hits them.

  • Unopened log block. waitFor() closes an "Octopus Deploy" block that nothing opens. TeamCity ignores the unmatched close, so the log isn't broken, but Go CLI steps lose the block that legacy steps grouped their output under. The block now opens before the step's commands run.
  • Output joined into one line. Besides writing each line to the build log, the step keeps a copy of the output to classify a failure and read the command's response. That copy joined the lines with no separators. The error classifier's .* patterns, such as space .* not found, could then match across what were separate lines, and a transient failure could be classified as permanent and not retried. Each line in the copy now ends with a newline, as the legacy capture did.

Notes:

  • The build log itself was unaffected by the missing newlines; only the in-memory copy was.
  • The block opens after the CLI is extracted, so extraction errors appear outside it.
  • The output fix has no unit test: runCommand starts a real process.

🤖 Generated with Claude Code

APErebus and others added 18 commits October 20, 2026 12:21
The Go CLI archives are now downloaded at build time (#282). Drop the
committed cli/ archives and point downloadOctopusCli at resources/cli/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring in the per-architecture Go CLI archives (#283). Port the
architecture lookup into cli/OctopusOsUtils and move its test into the
cli package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est (#286)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
…ines apart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Oct 30, 2026
Base automatically changed from ap/default-to-new-cli to main November 5, 2026 04:10
…nd-output

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@matt-richardson
matt-richardson marked this pull request as ready for review November 5, 2026 04:27
@matt-richardson
matt-richardson merged commit 36fac11 into main Nov 5, 2026
5 of 6 checks passed
@matt-richardson
matt-richardson deleted the mr/go-cli-log-block-and-output branch November 5, 2026 05:08
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