fix(review): read the --open review URL from stderr (oasdiff >= v1.19.1)#165
Merged
Conversation
oasdiff v1.19.1 (#1011) moved the "Opening <url>" line from stdout to stderr so it can't corrupt piped --format json/yaml output. The action's --open run greps the URL from stdout with `2>/dev/null`, so against v1.19.1 it found no URL, emitted the misleading "couldn't upload, re-run" warning, and posted NO review comment -- a silent break of the whole free-review link. Caught by the w3 encrypted-review e2e run against tufin/oasdiff:latest. Merge stderr into the pipe (2>&1) so the URL is captured regardless of which stream oasdiff prints it on. Works with both old (stdout) and new (stderr) oasdiff. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
oasdiff v1.19.1 (oasdiff/oasdiff#1011) moved the
Opening <url>line from stdout to stderr so--opencan't corrupt piped--format json/yamloutput. But the action's--openrun extracts the review URL by grepping stdout with2>/dev/null:free_review_url=$(oasdiff breaking ... --open --template= 2>/dev/null | grep .../review/e/...)Against v1.19.1 that finds nothing → the action emits the misleading "couldn't upload, re-run the job" warning and posts no review comment at all, silently breaking the entire free-review link.
Fix
Merge stderr into the pipe (
2>&1) so the URL is captured regardless of which stream oasdiff prints it on. Works with both old (stdout, ≤ v1.19.0) and new (stderr, ≥ v1.19.1) oasdiff.How it was caught
The w3 encrypted-review e2e, run against
tufin/oasdiff:latest(main HEAD, with #1011) via atest/oasdiff-latest-imageaction branch: the workflow failed the gate as expected but no/review/ecomment appeared; the run log showedoasdiff: couldn't upload the side-by-side review. This must merge before action v0.1.1 is cut on oasdiff v1.19.1.Test
sh -nclean on both entrypoints; re-validated by re-running the encrypted-review e2e with this fix applied (green).🤖 Generated with Claude Code