mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-07-09 17:19:02 +00:00
fix(ci): detect silent triage failures with empty-response check (#6566)
* fix(ci): detect silent triage failures with empty-response check The qwen-triage workflow relied on qwen-code-action to surface failures, but when the CLI exited 0 with empty output the step reported success with no triage comments posted. Add a post-step that checks the action's summary output and fails the job if it is empty, making silent failures visible in the Actions log. Defense-in-depth for QwenLM/qwen-code#6553 (primary fix in qwen-code-action). * ci: bump qwen-code-action pin to 6d08e91 Picks up the stderr visibility fix (QwenLM/qwen-code-action#12) that always emits stderr to the step log and warns on empty responses. Bumps all 5 workflows pinned to the action. * fix(ci): pass triage summary through env
This commit is contained in:
parent
637d00cebc
commit
2a1807f08d
6 changed files with 31 additions and 5 deletions
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
runs-on: 'ubuntu-latest'
|
runs-on: 'ubuntu-latest'
|
||||||
steps:
|
steps:
|
||||||
- name: 'Run Qwen Issue Analysis'
|
- name: 'Run Qwen Issue Analysis'
|
||||||
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
|
uses: 'QwenLM/qwen-code-action@6d08e91aa807257b9c8af60edb5bb6bb2d7d951f'
|
||||||
id: 'qwen_issue_analysis'
|
id: 'qwen_issue_analysis'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
|
|
|
||||||
2
.github/workflows/qwen-code-pr-review.yml
vendored
2
.github/workflows/qwen-code-pr-review.yml
vendored
|
|
@ -1037,7 +1037,7 @@ jobs:
|
||||||
- name: 'Resolve conflicts'
|
- name: 'Resolve conflicts'
|
||||||
if: "steps.prepare.outputs.decision == 'run'"
|
if: "steps.prepare.outputs.decision == 'run'"
|
||||||
id: 'resolve_conflicts'
|
id: 'resolve_conflicts'
|
||||||
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
|
uses: 'QwenLM/qwen-code-action@6d08e91aa807257b9c8af60edb5bb6bb2d7d951f'
|
||||||
env:
|
env:
|
||||||
PR_NUMBER: '${{ steps.resolve.outputs.pr_number }}'
|
PR_NUMBER: '${{ steps.resolve.outputs.pr_number }}'
|
||||||
BASE_REF: '${{ steps.prepare.outputs.base_ref }}'
|
BASE_REF: '${{ steps.prepare.outputs.base_ref }}'
|
||||||
|
|
|
||||||
|
|
@ -292,7 +292,7 @@ jobs:
|
||||||
echo "Issue follow-up state: event=${EVENT_NAME} dispatch_dry=${DISPATCH_DRY_RUN} issues_dry=${ISSUE_OPENED_DRY_RUN} schedule_dry=${SCHEDULE_DRY_RUN} resolved_dry_run=${dry_run} scheduled_limit=${SCHEDULED_LIMIT_INPUT}"
|
echo "Issue follow-up state: event=${EVENT_NAME} dispatch_dry=${DISPATCH_DRY_RUN} issues_dry=${ISSUE_OPENED_DRY_RUN} schedule_dry=${SCHEDULE_DRY_RUN} resolved_dry_run=${dry_run} scheduled_limit=${SCHEDULED_LIMIT_INPUT}"
|
||||||
|
|
||||||
- name: 'Run Qwen issue follow-up'
|
- name: 'Run Qwen issue follow-up'
|
||||||
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
|
uses: 'QwenLM/qwen-code-action@6d08e91aa807257b9c8af60edb5bb6bb2d7d951f'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ env.BOT_GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ env.BOT_GITHUB_TOKEN }}'
|
||||||
GH_TOKEN: '${{ env.BOT_GITHUB_TOKEN }}'
|
GH_TOKEN: '${{ env.BOT_GITHUB_TOKEN }}'
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
- name: 'Run Qwen Issue Triage'
|
- name: 'Run Qwen Issue Triage'
|
||||||
if: |-
|
if: |-
|
||||||
${{ steps.find_issues.outputs.issues_to_triage != '[]' }}
|
${{ steps.find_issues.outputs.issues_to_triage != '[]' }}
|
||||||
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
|
uses: 'QwenLM/qwen-code-action@6d08e91aa807257b9c8af60edb5bb6bb2d7d951f'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
|
||||||
ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}'
|
ISSUES_TO_TRIAGE: '${{ steps.find_issues.outputs.issues_to_triage }}'
|
||||||
|
|
|
||||||
16
.github/workflows/qwen-triage.yml
vendored
16
.github/workflows/qwen-triage.yml
vendored
|
|
@ -260,7 +260,8 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: 'Run Qwen Triage'
|
- name: 'Run Qwen Triage'
|
||||||
uses: 'QwenLM/qwen-code-action@5fd6818d04d64e87d255ee4d5f77995e32fbf4c2'
|
id: 'triage'
|
||||||
|
uses: 'QwenLM/qwen-code-action@6d08e91aa807257b9c8af60edb5bb6bb2d7d951f'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: '${{ secrets.QWEN_CODE_BOT_TOKEN || secrets.CI_BOT_PAT }}'
|
GITHUB_TOKEN: '${{ secrets.QWEN_CODE_BOT_TOKEN || secrets.CI_BOT_PAT }}'
|
||||||
GH_TOKEN: '${{ secrets.QWEN_CODE_BOT_TOKEN || secrets.CI_BOT_PAT }}'
|
GH_TOKEN: '${{ secrets.QWEN_CODE_BOT_TOKEN || secrets.CI_BOT_PAT }}'
|
||||||
|
|
@ -289,6 +290,19 @@ jobs:
|
||||||
}
|
}
|
||||||
prompt: '/triage ${{ steps.resolve.outputs.number }} --repo ${{ github.repository }}'
|
prompt: '/triage ${{ steps.resolve.outputs.number }} --repo ${{ github.repository }}'
|
||||||
|
|
||||||
|
- name: 'Check triage response'
|
||||||
|
if: 'success() || failure()'
|
||||||
|
shell: 'bash'
|
||||||
|
env:
|
||||||
|
RESPONSE: '${{ steps.triage.outputs.summary }}'
|
||||||
|
run: |-
|
||||||
|
set -uo pipefail
|
||||||
|
if [[ -z "${RESPONSE}" || "${RESPONSE}" == "null" ]]; then
|
||||||
|
echo "::error title=Triage silent failure::Qwen Code exited without a response. Check the 'Run Qwen Triage' step stderr above for diagnostics."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Triage response received (${#RESPONSE} chars)."
|
||||||
|
|
||||||
# On-demand real-user testing: a write-permission user comments
|
# On-demand real-user testing: a write-permission user comments
|
||||||
# `@qwen-code /tmux` on a PR to launch the changed app in a tmux TUI and
|
# `@qwen-code /tmux` on a PR to launch the changed app in a tmux TUI and
|
||||||
# exercise the affected flow. EXECUTES untrusted PR code, so: gated on the PR
|
# exercise the affected flow. EXECUTES untrusted PR code, so: gated on the PR
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,18 @@ describe('qwen-triage tmux workflow', () => {
|
||||||
expect(runStep).toContain("QWEN_HOME: '${{ runner.temp }}/qwen-home'");
|
expect(runStep).toContain("QWEN_HOME: '${{ runner.temp }}/qwen-home'");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('passes triage output through env before bash reads it', () => {
|
||||||
|
const checkStep = step('Check triage response');
|
||||||
|
|
||||||
|
expect(checkStep).toContain(
|
||||||
|
"RESPONSE: '${{ steps.triage.outputs.summary }}'",
|
||||||
|
);
|
||||||
|
expect(checkStep).not.toContain(
|
||||||
|
'RESPONSE="${{ steps.triage.outputs.summary }}"',
|
||||||
|
);
|
||||||
|
expect(checkStep).toContain('if [[ -z "${RESPONSE}"');
|
||||||
|
});
|
||||||
|
|
||||||
it('reports timeout and infra-error without claiming the flow was exercised', () => {
|
it('reports timeout and infra-error without claiming the flow was exercised', () => {
|
||||||
const postStep = step('Post tmux result comment');
|
const postStep = step('Post tmux result comment');
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue