This is an automated email from the ASF dual-hosted git repository.
Abacn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 4cfde9e6cbd [CI] Fix label race condition between LabelPrs and
pr-bot-pr-updates (#40141)
4cfde9e6cbd is described below
commit 4cfde9e6cbde6e1be82bf79fbbdf76bdb39f50af
Author: Yi Hu <[email protected]>
AuthorDate: Wed Sep 16 19:31:54 2026 -0400
[CI] Fix label race condition between LabelPrs and pr-bot-pr-updates
(#40141)
---
.github/workflows/label_prs.yml | 3 +++
.github/workflows/pr-bot-pr-updates.yml | 7 +++++--
scripts/ci/pr-bot/processPrUpdate.ts | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/label_prs.yml b/.github/workflows/label_prs.yml
index aa04506f2bf..b488cc498e5 100644
--- a/.github/workflows/label_prs.yml
+++ b/.github/workflows/label_prs.yml
@@ -19,6 +19,9 @@
name: LabelPrs
on: [pull_request_target]
permissions: read-all
+concurrency:
+ group: pr-bot-labels-${{ github.event.pull_request.number ||
github.event.issue.number }}
+ cancel-in-progress: false
jobs:
label:
runs-on: ubuntu-latest
diff --git a/.github/workflows/pr-bot-pr-updates.yml
b/.github/workflows/pr-bot-pr-updates.yml
index e3afd5b461b..dc5ae6672f8 100644
--- a/.github/workflows/pr-bot-pr-updates.yml
+++ b/.github/workflows/pr-bot-pr-updates.yml
@@ -20,6 +20,9 @@ on:
issue_comment:
types: [created]
permissions: read-all
+concurrency:
+ group: pr-bot-labels-${{ github.event.pull_request.number ||
github.event.issue.number }}
+ cancel-in-progress: false
jobs:
process-pr-update:
# Give GITHUB_TOKEN permissions to write pull request comments and to the
state branch, and read PR related info
@@ -30,8 +33,8 @@ jobs:
issues: read
statuses: read
- # Don't run on forks
- if: github.repository == 'apache/beam'
+ # Don't run on forks or non-PR issue comments
+ if: github.repository == 'apache/beam' && (github.event_name !=
'issue_comment' || github.event.issue.pull_request)
runs-on: ubuntu-latest
steps:
diff --git a/scripts/ci/pr-bot/processPrUpdate.ts
b/scripts/ci/pr-bot/processPrUpdate.ts
index d8598300a3e..3cfd873f37f 100644
--- a/scripts/ci/pr-bot/processPrUpdate.ts
+++ b/scripts/ci/pr-bot/processPrUpdate.ts
@@ -138,7 +138,8 @@ async function setNextActionReviewers(
console.log("No reviewers assigned, dont need to manipulate attention
set");
return;
}
- const existingLabels = payload.issue?.labels || payload.pull_request?.labels;
+ const existingLabels =
+ pull.labels || payload.issue?.labels || payload.pull_request?.labels;
await nextActionReviewers(pull.number, existingLabels);
let prState = await stateClient.getPrState(pull.number);
prState.nextAction = REVIEWERS_ACTION;