github-actions[bot] commented on code in PR #67119:
URL: https://github.com/apache/doris/pull/67119#discussion_r4016121544


##########
.github/workflows/checkstyle.yaml:
##########
@@ -22,12 +22,31 @@ on:
   pull_request:
   workflow_dispatch:
 
+permissions:
+  contents: read
+  pull-requests: read
+
 jobs:
   java-checkstyle:
     name: "CheckStyle"
     runs-on: ubuntu-latest
+    concurrency:
+      group: fe-code-style-${{ github.event.pull_request.number || 
github.run_id }}-${{ github.sha }}
+      cancel-in-progress: true
     if: github.event_name == 'pull_request'
     steps:
+      - name: Verify current PR head
+        env:
+          GH_TOKEN: ${{ github.token }}
+          PR_NUMBER: ${{ github.event.pull_request.number }}
+          EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }}

Review Comment:
   [P2] Fence the full live validation target, not only the head SHA
   
   `github.sha` and the checkout identify the test-merge commit, but this gate 
only compares `.head.sha`. A head can recur against a new base: PR 67413 runs 
[33579611406](https://github.com/apache/doris/actions/runs/33579611406) and 
[33581956590](https://github.com/apache/doris/actions/runs/33581956590) both 
had head `b850a4b3...`, but checked out `bb8cce3d...` (base `952bfcbb...`) and 
`7f9a6008...` (base `53a7c36a...`). An old M1 rerun now passes this check and 
publishes `Clang Formatter` against the same H; GitHub reports both checks as 
required on H even though M1 is already stale before the query. Please fence 
one coherent live PR state (at least open plus matching event base/head, or a 
robust live merge identity) in all four workflows, and ensure an obsolete 
same-head run neither executes stale validation nor poisons the current 
target's required check.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to