Skip to content

Strip literal '^[' ANSI escapes in test output cleaning - #2137

Merged
edmorley merged 1 commit into
mainfrom
edmorley/fix-ci-ansi-escape-stripping
Sep 2, 2026
Merged

edmorley merged 1 commit into
mainfrom
edmorley/fix-ci-ansi-escape-stripping

Conversation

@edmorley

@edmorley edmorley commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

The buildpack emits ANSI colour codes on error/warning banners. On GitHub Actions runners the escape byte arrives as the two literal characters ^[ instead of 0x1B, so clean_output's regex (which only matched real ESC) left them in and broke output-matching assertions across the integration-test suite.

eg:
https://github.com/heroku/heroku-buildpack-python/actions/runs/33632972131/job/100259966770#step:5:623

Widen the regex to strip both variants, mirroring heroku/heroku-buildpack-java#303.

GUS-W-24073123.

The buildpack emits ANSI colour codes on error/warning banners. On
GitHub Actions runners the escape byte arrives as the two literal
characters `^[` instead of 0x1B, so `clean_output`'s regex (which only
matched real ESC) left them in and broke output-matching assertions
across the integration-test suite.

Widen the regex to strip both variants, mirroring
heroku/heroku-buildpack-java#303.

GUS-W-24073123.
@edmorley edmorley self-assigned this Sep 2, 2026
@edmorley
edmorley marked this pull request as ready for review September 2, 2026 13:28
@edmorley
edmorley requested a review from a team as a code owner September 2, 2026 13:28
@edmorley
edmorley enabled auto-merge (squash) September 2, 2026 13:28
@edmorley
edmorley merged commit 457520f into main Sep 2, 2026
9 of 11 checks passed
@edmorley
edmorley deleted the edmorley/fix-ci-ansi-escape-stripping branch September 2, 2026 20:44
@heroku-linguist heroku-linguist Bot mentioned this pull request Sep 3, 2026
edmorley added a commit to heroku/heroku-buildpack-dotnet that referenced this pull request Sep 5, 2026
The buildpack emits ANSI colour codes on error/warning banners. On
GitHub Actions runners the escape byte arrives as the two literal
characters `^[` instead of 0x1B, so `clean_output`'s regex (which only
matched real ESC) left them in and broke output-matching assertions
across the integration-test suite.

Widen the regex to strip both variants, mirroring
heroku/heroku-buildpack-python#2137 and heroku/heroku-buildpack-java#303.

GUS-W-24100567.
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.

2 participants