Skip to content

Commit e09228b

Browse files
committed
[SPARK-60615][INFRA] Restore PR labeler (without pull_request_target)
### What changes were proposed in this pull request? Restore the labeler removed in [#54216](#54216) (SPARK-55433). - Run the official [`actions/labeler`](https://github.com/actions/labeler) every 10 minutes on PRs (both open and closed) updated since the last run of the labeler, plus a 10-minute overlap. Only write when labels change. - Sort and refresh the path rules, including new `DECLARATIVE PIPELINES` and `UDF` labels, which I have manually created. - Restore the `SCHEDULER`, `SHUFFLE`, and `BLOCK MANAGER` labels that we used to have. ### Why are the changes needed? Labels make it easier to find PRs by area. ASF is [disabling][asf] `pull_request_target` in November 2026, so we cannot restore the old workflow. [asf]: https://infra.apache.org/github-actions-policy.html This scheduled scan is much simpler than having a signal-based set of workflows or using some custom labeler action. The official GitHub labeler action runs from `master` without checking out PR code, including for PRs against maintenance branches. 1 workflow; no custom actions; no backports needed. For the initial labeling post merge, or to catch up after some kind of delay (e.g. GitHub Actions outage), committers can backfill labels using the command documented in the workflow. ### Does this PR introduce _any_ user-facing change? No. For contributors on GitHub only: PRs get area labels again, on a delay rather than immediately. Configured labels are kept in sync with changed files; unrelated labels such as `ai-review-requested` are preserved. The labeler config is authoritative and labels from that config applied manually will be removed by the action if they do not match its rules. ### How was this patch tested? Checked with ShellCheck and actionlint, suppressing only actionlint 1.7.12’s unrecognized `concurrency.queue` diagnostic. Local mocked-API tests against `actions/labelerv7` passed: 92 path cases, incremental and backfill PR selection, pagination, failure handling, label removal, preservation of unrelated labels, and zero writes on repeat runs. No writes were sent to GitHub. The scheduled trigger needs verification after merge, since it only runs from `master`. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: GitHub Copilot Closes #59862 from nchammas/restore-pr-labeler. Authored-by: Nicholas Chammas <[email protected]> Signed-off-by: Nicholas Chammas <[email protected]> skip-checks: true
1 parent 6e64f56 commit e09228b

2 files changed

Lines changed: 428 additions & 0 deletions

File tree

‎.github/labeler.yml‎

Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
#
19+
20+
# Keep labels and globs sorted, with exclusions (!) after the globs they narrow.
21+
22+
AVRO:
23+
- changed-files:
24+
- any-glob-to-any-file: [
25+
'connector/avro/**/*',
26+
'python/**/avro/**/*',
27+
]
28+
29+
BLOCK MANAGER:
30+
- changed-files:
31+
- all-globs-to-any-file: [
32+
'core/src/**/storage/**/*',
33+
'!**/ui/**/*',
34+
]
35+
- any-glob-to-any-file: [
36+
'common/utils/src/**/storage/**/*',
37+
]
38+
39+
BUILD:
40+
- changed-files:
41+
- all-globs-to-any-file: [
42+
'dev/**/*',
43+
'!dev/create_jira_and_branch.py',
44+
'!dev/create_spark_jira.py',
45+
'!dev/merge_spark_pr.py',
46+
'!dev/next_version_candidates.py',
47+
'!dev/pr_merge_status.py',
48+
'!dev/spark_jira_utils.py',
49+
'!dev/spark_merge_footer.py',
50+
]
51+
- any-glob-to-any-file: [
52+
'**/pom.xml',
53+
'.mvn/**/*',
54+
'.pre-commit-config.yaml',
55+
'.sbtopts',
56+
'assembly/**/*',
57+
'bin/docker-image-tool.sh',
58+
'bin/find-spark-home*',
59+
'build/**/*',
60+
'project/**/*',
61+
'pyproject.toml',
62+
'scalastyle-config.xml',
63+
]
64+
65+
CONNECT:
66+
- changed-files:
67+
- any-glob-to-any-file: [
68+
'bin/spark-connect-shell',
69+
'connector/connect/**/*',
70+
'python/**/connect/**/*',
71+
'sbin/*-connect-server.sh',
72+
'sql/connect/**/*',
73+
]
74+
75+
CORE:
76+
- changed-files:
77+
- all-globs-to-any-file: [
78+
'common/config/**/*',
79+
'!common/config/**/sql.textproto',
80+
]
81+
- all-globs-to-any-file: [
82+
'common/utils/**/*',
83+
'!common/utils/src/main/resources/error/**',
84+
]
85+
- all-globs-to-any-file: [
86+
'core/**/*',
87+
'!**/*UI.scala',
88+
'!**/ui/**/*',
89+
]
90+
- any-glob-to-any-file: [
91+
'common/kvstore/**/*',
92+
'common/network-common/**/*',
93+
'common/network-shuffle/**/*',
94+
'common/tags/**/*',
95+
'common/utils-java/**/*',
96+
'python/pyspark/*.py',
97+
'python/pyspark/core/**/*',
98+
'python/pyspark/resource/**/*',
99+
'python/pyspark/tests/**/*.py',
100+
]
101+
102+
DECLARATIVE PIPELINES:
103+
- changed-files:
104+
- any-glob-to-any-file: [
105+
'bin/spark-pipelines',
106+
'docs/**/declarative-pipelines*',
107+
'python/docs/source/reference/pyspark.pipelines.rst',
108+
'python/pyspark/pipelines/**/*',
109+
'python/pyspark/sql/connect/proto/pipelines_pb2.*',
110+
'sql/**/pipelines/**/*',
111+
'sql/connect/common/src/main/protobuf/spark/connect/pipelines.proto',
112+
]
113+
114+
DEPLOY:
115+
- changed-files:
116+
- any-glob-to-any-file: [
117+
'bin/load-spark-env*',
118+
'bin/spark-class*',
119+
'conf/**/*',
120+
'sbin/**/*',
121+
]
122+
123+
DOCS:
124+
- changed-files:
125+
- any-glob-to-any-file: [
126+
'**/CONTRIBUTING.md',
127+
'**/README*',
128+
'docs/**/*',
129+
'python/docs/**/*',
130+
]
131+
132+
DSTREAM:
133+
- changed-files:
134+
- any-glob-to-any-file: [
135+
'connector/kafka-0-10/**/*',
136+
'connector/kafka-0-10-assembly/**/*',
137+
'connector/kafka-0-10-token-provider/**/*',
138+
'connector/kinesis-asl/**/*',
139+
'connector/kinesis-asl-assembly/**/*',
140+
'data/streaming/**/*',
141+
'python/pyspark/streaming/**/*',
142+
'streaming/**/*',
143+
]
144+
145+
EXAMPLES:
146+
- changed-files:
147+
- any-glob-to-any-file: [
148+
'bin/run-example*',
149+
'examples/**/*',
150+
]
151+
152+
GRAPHX:
153+
- changed-files:
154+
- any-glob-to-any-file: [
155+
'data/graphx/**/*',
156+
'graphx/**/*',
157+
]
158+
159+
INFRA:
160+
- changed-files:
161+
- any-glob-to-any-file: [
162+
'.asf.yaml',
163+
'.gitattributes',
164+
'.github/**/*',
165+
'.gitignore',
166+
'dev/create-release/**/*',
167+
'dev/create_jira_and_branch.py',
168+
'dev/create_spark_jira.py',
169+
'dev/merge_spark_pr.py',
170+
'dev/next_version_candidates.py',
171+
'dev/pr_merge_status.py',
172+
'dev/spark_jira_utils.py',
173+
'dev/spark_merge_footer.py',
174+
'tools/**/*',
175+
]
176+
177+
KUBERNETES:
178+
- changed-files:
179+
- any-glob-to-any-file: [
180+
'bin/docker-image-tool.sh',
181+
'resource-managers/kubernetes/**/*',
182+
]
183+
184+
ML:
185+
- changed-files:
186+
- any-glob-to-any-file: [
187+
'**/*mllib_*.R',
188+
'**/ml/**/*',
189+
]
190+
191+
MLLIB:
192+
- changed-files:
193+
- any-glob-to-any-file: [
194+
'**/mllib/**/*',
195+
'mllib-local/**/*',
196+
]
197+
198+
PANDAS API ON SPARK:
199+
- changed-files:
200+
- any-glob-to-any-file: [
201+
'python/pyspark/pandas/**/*',
202+
]
203+
204+
PROTOBUF:
205+
- changed-files:
206+
- any-glob-to-any-file: [
207+
'connector/protobuf/**/*',
208+
'python/**/protobuf/**/*',
209+
]
210+
211+
PYTHON:
212+
- changed-files:
213+
- any-glob-to-any-file: [
214+
'**/python/**/*',
215+
'bin/pyspark*',
216+
'pyproject.toml',
217+
]
218+
219+
R:
220+
- changed-files:
221+
- any-glob-to-any-file: [
222+
'**/R/**/*',
223+
'**/r/**/*',
224+
'bin/sparkR*',
225+
]
226+
227+
SCHEDULER:
228+
- changed-files:
229+
- any-glob-to-any-file: [
230+
'common/utils/src/**/scheduler/**/*',
231+
'core/src/**/scheduler/**/*',
232+
]
233+
234+
SHUFFLE:
235+
- changed-files:
236+
- any-glob-to-any-file: [
237+
'common/network-common/**/shuffle/**/*',
238+
'common/network-shuffle/**/*',
239+
'common/network-yarn/**/*',
240+
'core/src/**/shuffle/**/*',
241+
'resource-managers/**/shuffle/**/*',
242+
]
243+
244+
SPARK SHELL:
245+
- changed-files:
246+
- any-glob-to-any-file: [
247+
'bin/spark-shell*',
248+
'repl/**/*',
249+
]
250+
251+
SPARK SUBMIT:
252+
- changed-files:
253+
- any-glob-to-any-file: [
254+
'bin/spark-submit*',
255+
'core/src/**/SparkSubmit*',
256+
'launcher/**/*',
257+
]
258+
259+
SQL:
260+
- changed-files:
261+
- all-globs-to-any-file: [
262+
'**/sql/**/*',
263+
'!python/**/avro/**/*',
264+
'!python/**/protobuf/**/*',
265+
'!python/**/streaming/**/*',
266+
]
267+
- any-glob-to-any-file: [
268+
'**/*catalog.R',
269+
'**/*column.R',
270+
'**/*functions.R',
271+
'**/*group.R',
272+
'**/*schema.R',
273+
'**/*SQL*.R',
274+
'**/*types.R',
275+
'**/*WindowSpec.R',
276+
'**/DataFrame.R',
277+
'bin/beeline*',
278+
'bin/spark-sql*',
279+
'common/config/**/sql.textproto',
280+
'common/sketch/**/*',
281+
'common/unsafe/**/*',
282+
'common/variant/**/*',
283+
'connector/docker-integration-tests/**/*',
284+
'sbin/*thriftserver*.sh',
285+
]
286+
287+
STRUCTURED STREAMING:
288+
- changed-files:
289+
- any-glob-to-any-file: [
290+
'**/*streaming.R',
291+
'**/sql/**/streaming/**/*',
292+
'connector/kafka-0-10-sql/**/*',
293+
'connector/kafka-0-10-token-provider/**/*',
294+
]
295+
296+
UDF:
297+
- changed-files:
298+
- all-globs-to-any-file: [
299+
'**/*{UDAF,udaf,UDF,udf,UDTF,udtf,UserDefined*Aggregat*,UserDefined*Function*,UserDefinedScalar*}*',
300+
'!**/*-results.txt',
301+
'!**/*.sql.out',
302+
]
303+
- all-globs-to-any-file: [
304+
'**/udf/**/*',
305+
'!**/*-results.txt',
306+
'!**/*.sql.out',
307+
]
308+
- any-glob-to-any-file: [
309+
'python/pyspark/eval_handlers/**/*',
310+
'python/pyspark/tests/test_worker.py',
311+
'python/pyspark/worker*.py',
312+
]
313+
314+
WEB UI:
315+
- changed-files:
316+
- any-glob-to-any-file: [
317+
'**/*UI.scala',
318+
'**/ui/**/*',
319+
'ui-test/**/*',
320+
]
321+
322+
WINDOWS:
323+
- changed-files:
324+
- any-glob-to-any-file: [
325+
'**/*.cmd',
326+
'R/pkg/tests/fulltests/test_Windows.R',
327+
]
328+
329+
YARN:
330+
- changed-files:
331+
- any-glob-to-any-file: [
332+
'common/network-yarn/**/*',
333+
'resource-managers/yarn/**/*',
334+
]

0 commit comments

Comments
 (0)