Skip to content

Commit be35003

Browse files
authored
[ci] Merge Queue, label system overhaul, and slash commands (2/2) (#1187)
1 parent 26bd4db commit be35003

10 files changed

Lines changed: 887 additions & 137 deletions

File tree

.buildkite/pipeline.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ steps:
88
# Core component validation: encoders, VAEs, transformers,
99
# CUDA kernels, and unit tests.
1010
# ============================================================
11-
- label: "Trigger Fastcheck"
12-
plugins:
13-
- monorepo-diff#v1.4.0:
14-
diff: 'git fetch origin "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" && git diff --name-only origin/"$BUILDKITE_PULL_REQUEST_BASE_BRANCH"...HEAD'
15-
watch:
11+
- label: "Trigger Fastcheck"
12+
plugins:
13+
- monorepo-diff#v1.4.0:
14+
diff: 'git fetch origin "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-main}" && git diff --name-only "origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-main}...HEAD"'
15+
watch:
1616
- path:
1717
- "fastvideo/models/encoders/**"
1818
- "fastvideo/models/loader/**"
@@ -85,12 +85,12 @@ steps:
8585
# Actions → Buildkite API). Includes integration tests, SSIM
8686
# regression, training pipelines, and performance benchmarks.
8787
# ============================================================
88-
- label: "Trigger Full Suite"
89-
if: build.env("FULL_SUITE") == "true"
90-
plugins:
91-
- monorepo-diff#v1.4.0:
92-
diff: 'git fetch origin "$BUILDKITE_PULL_REQUEST_BASE_BRANCH" && git diff --name-only origin/"$BUILDKITE_PULL_REQUEST_BASE_BRANCH"...HEAD'
93-
watch:
88+
- label: "Trigger Full Suite"
89+
if: build.env("FULL_SUITE") == "true" || build.branch =~ /^mergify\/merge-queue\//
90+
plugins:
91+
- monorepo-diff#v1.4.0:
92+
diff: 'git fetch origin "${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-main}" && git diff --name-only "origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-main}...HEAD"'
93+
watch:
9494
- path:
9595
- "fastvideo/**/*.py"
9696
- "pyproject.toml"

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- PR title must start with a type tag: [feat], [bugfix], [refactor], [perf], [ci], [docs], [misc], [new-model] -->
2+
<!-- Example: [feat] Add HunyuanVideo 1.5 support -->
3+
14
## Purpose
25

36
<!-- What does this PR do? Link the related issue if applicable. -->

.github/mergify.yml

Lines changed: 140 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,168 +1,206 @@
1+
queue_rules:
2+
- name: default
3+
queue_conditions:
4+
- check-success~=pre-commit
5+
- "#approved-reviews-by>=1"
6+
- -draft
7+
- -conflict
8+
- -closed
9+
- label!=do-not-merge
10+
merge_conditions:
11+
- check-success~=buildkite/ci
12+
merge_method: squash
13+
commit_message_template: |
14+
{{ title }} (#{{ number }})
15+
16+
{{ body }}
17+
18+
merge_protections:
19+
- name: PR title must follow conventional format
20+
if:
21+
- base = main
22+
success_conditions:
23+
- "title~=(?i)^\\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model)\\]"
24+
125
pull_request_rules:
226

327
# ============================================================
4-
# Auto-labeling by file path
28+
# Type labels (from PR title prefix)
529
# ============================================================
630

7-
- name: label attention changes
31+
- name: "label type: feat"
832
conditions:
9-
- or:
10-
- files~=^fastvideo/attention/
11-
- files~=^csrc/attn/
33+
- "title~=(?i)^\\[(feat|feature)\\]"
1234
- -closed
13-
- label!=stale
1435
actions:
1536
label:
16-
add: [attention]
37+
add: ["type: feat"]
1738

18-
- name: label encoder changes
39+
- name: "label type: bugfix"
1940
conditions:
20-
- files~=^fastvideo/models/encoders/
41+
- "title~=(?i)^\\[(bug)?fix\\]"
2142
- -closed
22-
- label!=stale
2343
actions:
2444
label:
25-
add: [encoder]
45+
add: ["type: bugfix"]
2646

27-
- name: label vae changes
47+
- name: "label type: refactor"
2848
conditions:
29-
- files~=^fastvideo/models/vaes/
49+
- "title~=(?i)^\\[refactor\\]"
3050
- -closed
31-
- label!=stale
3251
actions:
3352
label:
34-
add: [vae]
53+
add: ["type: refactor"]
3554

36-
- name: label transformer/DiT changes
55+
- name: "label type: perf"
3756
conditions:
38-
- files~=^fastvideo/models/dits/
57+
- "title~=(?i)^\\[perf\\]"
3958
- -closed
40-
- label!=stale
4159
actions:
4260
label:
43-
add: [transformer]
61+
add: ["type: perf"]
4462

45-
- name: label training changes
63+
- name: "label type: ci"
4664
conditions:
47-
- files~=^fastvideo/training/
65+
- "title~=(?i)^\\[ci\\]"
4866
- -closed
49-
- label!=stale
5067
actions:
5168
label:
52-
add: [training]
69+
add: ["type: ci"]
5370

54-
- name: label pipeline changes
71+
- name: "label type: docs"
5572
conditions:
56-
- files~=^fastvideo/pipelines/
73+
- "title~=(?i)^\\[(doc|docs)\\]"
5774
- -closed
58-
- label!=stale
5975
actions:
6076
label:
61-
add: [pipeline]
77+
add: ["type: docs"]
6278

63-
- name: label distributed changes
79+
- name: "label type: misc"
6480
conditions:
65-
- files~=^fastvideo/distributed/
81+
- "title~=(?i)^\\[(misc|chore)\\]"
6682
- -closed
67-
- label!=stale
6883
actions:
6984
label:
70-
add: [distributed]
85+
add: ["type: misc"]
7186

72-
- name: label kernel changes
87+
- name: "label type: new-model"
88+
conditions:
89+
- "title~=(?i)^\\[new.?model\\]"
90+
- -closed
91+
actions:
92+
label:
93+
add: ["type: new-model"]
94+
95+
# ============================================================
96+
# Scope labels (from changed files)
97+
# ============================================================
98+
99+
- name: "label scope: training"
73100
conditions:
74101
- or:
75-
- files~=^csrc/
76-
- files~=^fastvideo-kernel/
102+
- files~=^fastvideo/train/
103+
- files~=^fastvideo/training/
104+
- files~=^fastvideo/distillation/
105+
- files~=^examples/train/
106+
- files~=^examples/training/
107+
- files~=^examples/distill/
77108
- -closed
78-
- label!=stale
79109
actions:
80110
label:
81-
add: [kernel]
111+
add: ["scope: training"]
82112

83-
- name: label data/dataset changes
113+
- name: "label scope: inference"
84114
conditions:
85115
- or:
86-
- files~=^fastvideo/dataset/
87-
- files~=^fastvideo/data_preprocess/
116+
- files~=^fastvideo/pipelines/basic/
117+
- files~=^fastvideo/pipelines/stages/
118+
- files~=^fastvideo/pipelines/samplers/
119+
- files~=^fastvideo/entrypoints/
120+
- files~=^fastvideo/worker/
121+
- files~=^fastvideo/configs/sample/
122+
- files~=^fastvideo/configs/pipelines/
123+
- files~=^examples/inference/
88124
- -closed
89-
- label!=stale
90125
actions:
91126
label:
92-
add: [data]
127+
add: ["scope: inference"]
93128

94-
- name: label CLI/entrypoint changes
129+
- name: "label scope: attention"
95130
conditions:
96-
- files~=^fastvideo/entrypoints/
131+
- files~=^fastvideo/attention/
97132
- -closed
98-
- label!=stale
99133
actions:
100134
label:
101-
add: [cli]
135+
add: ["scope: attention"]
102136

103-
- name: label documentation changes
137+
- name: "label scope: kernel"
104138
conditions:
105139
- or:
106-
- files~=^docs/
107-
- files~=\.md$
140+
- files~=^fastvideo-kernel/
141+
- files~=^csrc/
142+
- -closed
143+
actions:
144+
label:
145+
add: ["scope: kernel"]
146+
147+
- name: "label scope: data"
148+
conditions:
149+
- or:
150+
- files~=^fastvideo/dataset/
151+
- files~=^fastvideo/pipelines/preprocess/
152+
- files~=^examples/preprocessing/
108153
- -closed
109-
- label!=stale
110154
actions:
111155
label:
112-
add: [documentation]
156+
add: ["scope: data"]
113157

114-
- name: label CI changes
158+
- name: "label scope: infra"
115159
conditions:
116160
- or:
117161
- files~=^\.github/
118162
- files~=^\.buildkite/
163+
- files~=^fastvideo/tests/
119164
- files~=^docker/
120165
- -closed
121-
- label!=stale
122166
actions:
123167
label:
124-
add: [ci]
168+
add: ["scope: infra"]
125169

126-
- name: label test changes
170+
- name: "label scope: distributed"
127171
conditions:
128-
- or:
129-
- files~=^fastvideo/tests/
130-
- files~=^tests/
172+
- files~=^fastvideo/distributed/
131173
- -closed
132-
- label!=stale
133174
actions:
134175
label:
135-
add: [tests]
176+
add: ["scope: distributed"]
136177

137-
- name: label ComfyUI changes
178+
- name: "label scope: docs"
138179
conditions:
139-
- files~=^comfyui/
180+
- files~=^docs/
140181
- -closed
141-
- label!=stale
142182
actions:
143183
label:
144-
add: [comfyui]
184+
add: ["scope: docs"]
145185

146-
- name: label layer changes
186+
- name: "label scope: ui"
147187
conditions:
148-
- files~=^fastvideo/layers/
188+
- files~=^ui/
149189
- -closed
150-
- label!=stale
151190
actions:
152191
label:
153-
add: [layers]
192+
add: ["scope: ui"]
154193

155-
- name: label LoRA changes
194+
- name: "label scope: model"
156195
conditions:
157196
- or:
158-
- files~=^fastvideo/layers/lora/
159-
- files~=^fastvideo/tests/lora/
160-
- title~=(?i)lora
197+
- files~=^fastvideo/models/
198+
- files~=^fastvideo/layers/
199+
- files~=^fastvideo/configs/models/
161200
- -closed
162-
- label!=stale
163201
actions:
164202
label:
165-
add: [lora]
203+
add: ["scope: model"]
166204

167205
# ============================================================
168206
# Pre-commit failure help comment
@@ -253,27 +291,40 @@ pull_request_rules:
253291
label:
254292
remove: [needs-rebase]
255293

256-
# ============================================================
257-
# Auto-rebase stale PRs
258-
# ============================================================
259-
260-
- name: auto-merge when ready and approved
294+
- name: enter merge queue when ready and approved
261295
conditions:
262296
- label=ready
263-
- "#approved-reviews-by>=1"
264-
- check-success~=pre-commit
265-
- -conflict
297+
actions:
298+
queue:
299+
name: default
300+
301+
- name: comment on invalid PR title format
302+
conditions:
266303
- -closed
267304
- -draft
305+
- "-title~=(?i)^\\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model)\\]"
268306
actions:
269-
merge:
270-
method: squash
307+
comment:
308+
message: |
309+
## ⚠️ PR title format required
310+
311+
Your PR title must start with a type tag in brackets. Examples:
312+
- `[feat] Add new model support`
313+
- `[bugfix] Fix VAE tiling corruption`
314+
- `[refactor] Restructure training pipeline`
315+
- `[perf] Optimize attention kernel`
316+
- `[ci] Update test infrastructure`
317+
- `[docs] Add inference guide`
318+
- `[misc] Clean up configs`
319+
- `[new-model] Port Flux2 to FastVideo`
320+
321+
Valid tags: `feat`, `feature`, `bugfix`, `fix`, `refactor`, `perf`, `ci`, `doc`, `docs`, `misc`, `chore`, `kernel`, `new-model`
322+
323+
Please update your PR title and the merge protection check will pass automatically.
271324
272-
- name: auto-rebase on ready label
325+
- name: delete merged branch
273326
conditions:
274-
- label=ready
275-
- "#approved-reviews-by>=1"
276-
- -conflict
277-
- -closed
327+
- merged
328+
- -head~=^(main|master|release[/-])$
278329
actions:
279-
rebase: {}
330+
delete_head_branch: {}

0 commit comments

Comments
 (0)