Skip to content

fix(validation): suppress ANSI color in bundling-failure annotation - #414

Merged
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:fix/047-bundling-annotation-no-color
Aug 7, 2026
Merged

fix(validation): suppress ANSI color in bundling-failure annotation#414
hdamker merged 1 commit into
camaraproject:mainfrom
hdamker:fix/047-bundling-annotation-no-color

Conversation

@hdamker

@hdamker hdamker commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What type of PR is this?

bug

What this PR does / why we need it:

When a spec fails to bundle, codeowners currently see a warning like Bundling failed for <spec>.yaml: [39m — a stray color-code fragment instead of Redocly's actual error message, with no clue what's actually wrong with their spec.

Redocly forces color into its output on GitHub Actions runners even though this step only captures the output and never displays it directly; the trailing color-reset code was overwriting the real error message before it reached the annotation. Adding NO_COLOR: "1" to the step stops Redocly from emitting color in the first place, so the annotation now shows the actual bundling error.

Verified on a real GitHub Actions run, not just locally — a previous attempt at this same fix only worked in local testing and hadn't been confirmed against the real runner.

Which issue(s) this PR fixes:

Related to #390 (closed on narrower grounds without landing the annotation fix investigated there).

Special notes for reviewers:

No test suite covers this workflow step directly; verification was a live Actions run against a spec with an unresolved $ref, confirming the annotation now shows Redocly's real message end-to-end.

Changelog input

release-note
Fixes an illegible bundling-failure warning annotation in CAMARA Validation by suppressing ANSI color in captured Redocly output.

Additional documentation

This section can be blank.

docs

GitHub Actions sets GITHUB_ACTIONS unconditionally, which redocly's color
library treats as reason enough to force color even on captured (non-TTY)
output. The resulting trailing color-reset line clobbered the
${err##*$'\n'} extraction, showing only "[39m" instead of the real message
— verified against a real runner, not local simulation.
@hdamker
hdamker requested review from Kevsy and rartych as code owners August 6, 2026 14:36
@hdamker hdamker added this to the v0.9.0 milestone Aug 6, 2026

@Kevsy Kevsy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hdamker
hdamker merged commit 06160f3 into camaraproject:main Aug 7, 2026
8 checks passed
@hdamker
hdamker deleted the fix/047-bundling-annotation-no-color branch August 7, 2026 08:58
This was referenced Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants