ci: Adding Antithesis Bug report action#3868
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new GitHub Actions workflow for generating Antithesis bug reports and standardizes naming conventions across all Antithesis-related workflows. It replaces PR #3866 with an improved implementation for debugging Antithesis test failures.
Key changes:
- Adds new
antithesis-run-bug-report.ymlworkflow that extracts moment data from Antithesis findings and triggers bug report generation - Renames workflows and jobs to follow a consistent "Antithesis - [Action]" naming pattern
- Updates concurrency group names to match the new naming convention
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
.github/workflows/antithesis-run-bug-report.yml |
New workflow that parses Antithesis moment data and triggers bug report generation via the antithesishq action |
.github/workflows/antithesis-trigger-run.yml |
Updates workflow and job names to "Antithesis - Trigger Run" for consistency; updates concurrency group identifier |
.github/workflows/antithesis-launch-debugger.yml |
Updates workflow and job names to "Antithesis - Launch Debugger" for consistency |
Comments suppressed due to low confidence (1)
.github/workflows/antithesis-trigger-run.yml:28
- The concurrency group identifier is missing a hyphen separator between the group name and the variable. This should be
antithesis-trigger-run-${{ github.head_ref || github.ref }}to maintain consistency with typical GitHub Actions concurrency group naming patterns.
| description: Bug oracle (look for output_text in the findings report) | ||
| emails: | ||
| type: string | ||
| required: true |
There was a problem hiding this comment.
The description states the input is required and should default to '[email protected]', but marking it as required means users must provide a value. Either remove 'required: true' to allow the default, or update the description to remove the mention of the default since users will be forced to provide a value.
| required: true |
| echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Trigger Antithesis Bug Report Generation | ||
| uses: antithesishq/antithesis-trigger-action@main |
There was a problem hiding this comment.
The action reference uses @main which points to a moving target and could introduce breaking changes or security vulnerabilities without notice. Consider pinning to a specific commit SHA or version tag for better stability and security (e.g., @v1.0.0 or @abc123).
| uses: antithesishq/antithesis-trigger-action@main | |
| uses: antithesishq/antithesis-trigger-action@v1 |
| bug_oracle: | ||
| type: string | ||
| required: true | ||
| description: Bug oracle (look for output_text in the findings report) |
There was a problem hiding this comment.
The description instructs users to look for 'output_text' in the findings report to get the bug oracle value, but this could be clearer. Consider providing more specific guidance on where to find this value or what format it should be in, especially since line 64 hardcodes custom.bug_oracle_type=output_text.
| description: Bug oracle (look for output_text in the findings report) | |
| description: Bug oracle value (paste the exact contents of the `output_text` field from the findings report) |
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | ||
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | ||
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') |
There was a problem hiding this comment.
The variable input should be quoted to prevent potential word splitting and pathname expansion. This is inconsistent with line 35 where the variable is properly quoted. Change echo $input to echo "$input" for consistency and safety.
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | |
| session_id_2=$(echo "$input" | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo "$input" | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo "$input" | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') |
| vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9.]*\).*/\1/p') | ||
|
|
||
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | ||
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | ||
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') |
There was a problem hiding this comment.
The regex pattern [0-9.]* on line 39 will match sequences with multiple or consecutive dots (e.g., "1..2" or "..."), which could lead to invalid vtime values. Consider using [0-9]+\.[0-9]+ or [0-9]+(\.[0-9]+)? to match valid numeric formats more precisely.
| vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9.]*\).*/\1/p') | |
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | |
| vtime_1=$(echo "$input" | sed -n 's/.*vtime: \([0-9]\+\(\.[0-9]\+\)\?\).*/\1/p') | |
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/p') |
|
|
||
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | ||
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | ||
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') |
There was a problem hiding this comment.
The sed pattern [0-9]*\.[0-9]* will match strings with only dots or empty matches (e.g., ".", "..", or even no digits at all), which could result in invalid vtime values. Use [0-9]+\.[0-9]+ to ensure at least one digit appears before and after the decimal point.
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | |
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]\+\.[0-9]\+\).*/\1/p') |
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | ||
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | ||
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | ||
|
|
||
| echo "session_id=${session_id_1:-$session_id_2}" >> "$GITHUB_OUTPUT" | ||
| echo "input_hash=${input_hash_1:-$input_hash_2}" >> "$GITHUB_OUTPUT" | ||
| echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT" | ||
|
|
There was a problem hiding this comment.
The extraction step doesn't validate whether the parsed values are non-empty before using them in the next step. If both parsing attempts fail, empty values will be passed to the Antithesis action, which could cause the bug report generation to fail silently or with unclear errors. Consider adding validation to ensure extracted values are non-empty and failing early with a clear error message if extraction fails.
| session_id_2=$(echo $input | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo $input | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo $input | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | |
| echo "session_id=${session_id_1:-$session_id_2}" >> "$GITHUB_OUTPUT" | |
| echo "input_hash=${input_hash_1:-$input_hash_2}" >> "$GITHUB_OUTPUT" | |
| echo "vtime=${vtime_1:-$vtime_2}" >> "$GITHUB_OUTPUT" | |
| session_id_2=$(echo "$input" | sed -n 's/.*id: "\([^"]*\)".*/\1/p') | |
| input_hash_2=$(echo "$input" | sed -n "s/.*), *'\([^']*\)'.*/\1/p") | |
| vtime_2=$(echo "$input" | sed -n 's/.*,\s*\([0-9]*\.[0-9]*\).*/\1/p') | |
| session_id="${session_id_1:-$session_id_2}" | |
| input_hash="${input_hash_1:-$input_hash_2}" | |
| vtime="${vtime_1:-$vtime_2}" | |
| if [ -z "$session_id" ] || [ -z "$input_hash" ] || [ -z "$vtime" ]; then | |
| echo "::error::Failed to extract session_id, input_hash, or vtime from input_string. Please ensure the input matches an expected Antithesis moment format." | |
| exit 1 | |
| fi | |
| echo "session_id=$session_id" >> "$GITHUB_OUTPUT" | |
| echo "input_hash=$input_hash" >> "$GITHUB_OUTPUT" | |
| echo "vtime=$vtime" >> "$GITHUB_OUTPUT" |
Ticket(s) Closed
What
Replaces #3866
Why
How
Tests