Skip to content

fix(ci): surface fern generate errors in preview#650

Merged
mchmarny merged 1 commit into
mainfrom
fix/fern-preview-error-visibility
Apr 23, 2026
Merged

fix(ci): surface fern generate errors in preview#650
mchmarny merged 1 commit into
mainfrom
fix/fern-preview-error-visibility

Conversation

@mchmarny

Copy link
Copy Markdown
Member

Summary

Add || true to the fern generate command so its error output is printed even when it exits non-zero.

Motivation / Context

The fern docs preview workflow silently swallows errors because bash -e aborts the script before echo "$OUTPUT" runs. This makes it impossible to diagnose failures like the one in run 24835193594.

Fixes: N/A
Related: N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • Build/CI/tooling

Component(s) Affected

  • CLI (cmd/aicr, pkg/cli)
  • API server (cmd/aicrd, pkg/api, pkg/server)
  • Recipe engine / data (pkg/recipe)
  • Bundlers (pkg/bundler, pkg/component/*)
  • Collectors / snapshotter (pkg/collector, pkg/snapshotter)
  • Validator (pkg/validator)
  • Core libraries (pkg/errors, pkg/k8s)
  • Docs/examples (docs/, examples/)
  • Other: CI workflows

Implementation Notes

When fern generate exits non-zero, bash -e terminates the step immediately — the captured output is never printed. Adding || true lets the script continue to echo "$OUTPUT", making the actual Fern error visible in logs. The existing URL-empty guard still correctly fails the step when no preview URL is produced.

Testing

CI-only change — no Go code affected.

Risk Assessment

  • Low — Isolated change, well-tested, easy to revert
  • Medium — Touches multiple components or has broader impact
  • High — Breaking change, affects critical paths, or complex rollout

Rollout notes: N/A

Checklist

  • Tests pass locally (make test with -race)
  • Linter passes (make lint)
  • I did not skip/disable tests to make CI green
  • I added/updated tests for new functionality
  • I updated docs if user-facing behavior changed
  • Changes follow existing patterns in the codebase
  • Commits are cryptographically signed (git commit -S) — GPG signing info

The fern generate command failure was swallowed by bash -e, preventing
the error output from being printed. Add || true so the output is
always visible in CI logs for debugging.
@mchmarny mchmarny requested a review from a team as a code owner April 23, 2026 12:35
@mchmarny mchmarny self-assigned this Apr 23, 2026
@mchmarny mchmarny merged commit a7c8bf6 into main Apr 23, 2026
28 checks passed
@mchmarny mchmarny deleted the fix/fern-preview-error-visibility branch April 23, 2026 12:35
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report ✅

Metric Value
Coverage 74.5%
Threshold 70%
Status Pass
Coverage Badge
![Coverage](https://img.shields.io/badge/coverage-74.5%25-green)

No Go source files changed in this PR.

@mchmarny mchmarny restored the fix/fern-preview-error-visibility branch May 1, 2026 16:30
@mchmarny mchmarny deleted the fix/fern-preview-error-visibility branch May 1, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant