This is an automated email from the ASF dual-hosted git repository.

zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new c99d3d24a7f [chore](ci) Add timeout and improve error handling for 
OpenCode review workflow (#61530)
c99d3d24a7f is described below

commit c99d3d24a7f89ce978c7671f98250ca2e636df14
Author: zclllyybb <[email protected]>
AuthorDate: Thu Mar 19 23:56:22 2026 +0800

    [chore](ci) Add timeout and improve error handling for OpenCode review 
workflow (#61530)
    
    Catch errors early to ensure they can be handled properly
---
 .github/workflows/opencode-review.yml | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/opencode-review.yml 
b/.github/workflows/opencode-review.yml
index 12db3ee067f..82d95fdd2c2 100644
--- a/.github/workflows/opencode-review.yml
+++ b/.github/workflows/opencode-review.yml
@@ -109,6 +109,7 @@ jobs:
 
       - name: Run automated code review
         id: review
+        timeout-minutes: 55
         continue-on-error: true
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -139,16 +140,18 @@ jobs:
           fi
 
       - name: Comment PR on review failure
-        if: ${{ steps.review.outcome == 'failure' }}
+        if: ${{ always() && steps.review.outcome != 'success' }}
         env:
           GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
+          REVIEW_OUTCOME: ${{ steps.review.outcome }}
           RUN_URL: ${{ github.server_url }}/${{ github.repository 
}}/actions/runs/${{ github.run_id }}
         run: |
+          error_msg="${FAILURE_REASON:-Review step was $REVIEW_OUTCOME 
(possibly timeout or cancelled)}"
           gh pr comment "${{ github.event.issue.number }}" --body "$(cat <<EOF
           OpenCode automated review failed and did not complete.
 
-          Error: ${FAILURE_REASON}
+          Error: ${error_msg}
           Workflow run: ${RUN_URL}
 
           Please inspect the workflow logs and rerun the review after the 
underlying issue is resolved.
@@ -156,9 +159,11 @@ jobs:
           )"
 
       - name: Fail workflow if review failed
-        if: ${{ steps.review.outcome == 'failure' }}
+        if: ${{ always() && steps.review.outcome != 'success' }}
         env:
           FAILURE_REASON: ${{ steps.review.outputs.failure_reason }}
+          REVIEW_OUTCOME: ${{ steps.review.outcome }}
         run: |
-          echo "OpenCode automated review failed: ${FAILURE_REASON}"
+          error_msg="${FAILURE_REASON:-Review step was $REVIEW_OUTCOME 
(possibly timeout or cancelled)}"
+          echo "OpenCode automated review failed: ${error_msg}"
           exit 1


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to