nchammas commented on code in PR #60352:
URL: https://github.com/apache/spark/pull/60352#discussion_r4552765389
##########
.github/workflows/labeler.yml:
##########
@@ -22,73 +22,80 @@
# Manually added configured labels are removed on the next scan if they do not
# match the PR's changed files.
#
-# To label all open PRs once, regardless of their last update:
-# gh workflow run labeler.yml --repo apache/spark --ref master -f
backfill=true
-
+# Each run labels PRs updated since 10 minutes before the last successful run
+# was created, so failed or skipped runs only widen the next run's window. The
+# PRs are split into groups that are labeled by parallel jobs, keeping each job
+# well within ubuntu-slim's 15-minute job limit.
name: Label pull requests
on:
schedule:
- cron: "7-59/10 * * * *"
workflow_dispatch:
- inputs:
- backfill:
- description: Label all open PRs regardless of their last update
- type: boolean
- default: false
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
- queue: max
jobs:
- label:
- name: Label pull requests
+ list:
+ name: List pull requests
if: github.repository == 'apache/spark' && github.ref ==
'refs/heads/master'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-slim
permissions:
actions: read
- contents: read
- pull-requests: write
+ pull-requests: read
+ outputs:
+ groups: ${{ steps.prs.outputs.groups }}
steps:
- - name: Checkout labeler configuration
- uses: actions/checkout@v7
- with:
- persist-credentials: false
- sparse-checkout: .github
- name: List PRs
id: prs
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BACKFILL: ${{ inputs.backfill }}
run: |
- if [[ "$BACKFILL" == "true" ]]; then
- filters=(-f state=open)
- echo "Listing all open PRs"
+ last_success=$(gh run list --repo "$GITHUB_REPOSITORY" \
+ --workflow labeler.yml --branch master --status success --limit 1 \
Review Comment:
We have never run and are not going to run the old backfill. Not worth a
code change to address this extreme corner case.
--
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]