1+ import { Group } from "components/HudGroupingSettings/mainPageSettingsUtils" ;
12import { GroupedJobStatus , JobStatus } from "components/job/GroupJobConclusion" ;
23import { getOpenUnstableIssues } from "lib/jobUtils" ;
3- import { IssueData , RowData } from "./types" ;
4- import { Group } from "components/HudGroupingSettings/mainPageSettingsUtils" ;
5-
6- const GROUP_MEMORY_LEAK_CHECK = "Memory Leak Check" ;
7- const GROUP_RERUN_DISABLED_TESTS = "Rerun Disabled Tests" ;
8- const GROUP_UNSTABLE = "Unstable" ;
9- const GROUP_PERIODIC = "Periodic" ;
10- const GROUP_INDUCTOR_PERIODIC = "Inductor Periodic" ;
11- const GROUP_SLOW = "Slow" ;
12- const GROUP_LINT = "Lint" ;
13- const GROUP_INDUCTOR = "Inductor" ;
14- const GROUP_ANDROID = "Android" ;
15- const GROUP_ROCM = "ROCm" ;
16- const GROUP_XLA = "XLA" ;
17- const GROUP_LINUX = "Linux" ;
18- const GROUP_BINARY_LINUX = "Binary Linux" ;
19- const GROUP_BINARY_WINDOWS = "Binary Windows" ;
20- const GROUP_ANNOTATIONS_AND_LABELING = "Annotations and labeling" ;
21- const GROUP_DOCKER = "Docker" ;
22- const GROUP_WINDOWS = "Windows" ;
23- const GROUP_CALC_DOCKER_IMAGE = "GitHub calculate-docker-image" ;
24- const GROUP_CI_DOCKER_IMAGE_BUILDS = "CI Docker Image Builds" ;
25- const GROUP_CI_CIRCLECI_PYTORCH_IOS = "ci/circleci: pytorch_ios" ;
26- const GROUP_IOS = "iOS" ;
27- const GROUP_MAC = "Mac" ;
28- const GROUP_PARALLEL = "Parallel" ;
29- const GROUP_DOCS = "Docs" ;
30- const GROUP_LIBTORCH = "Libtorch" ;
31- const GROUP_OTHER_VIABLE_STRICT_BLOCKING = "Other viable/strict blocking" ;
32- const GROUP_XPU = "XPU" ;
33- const GROUP_VLLM = "vLLM" ;
34- const GROUP_OTHER = "other" ;
35-
36- // Jobs will be grouped with the first regex they match in this list
37- export const groups = [
38- {
39- regex : / v l l m / ,
40- name : GROUP_VLLM ,
41- } ,
42- {
43- // Weird regex because some names are too long and getting cut off
44- // TODO: figure out a better way to name the job or filter them
45- regex : / , m e m _ l e a k / ,
46- name : GROUP_MEMORY_LEAK_CHECK ,
47- persistent : true ,
48- } ,
49- {
50- regex : / , r e r u n _ / ,
51- name : GROUP_RERUN_DISABLED_TESTS ,
52- persistent : true ,
53- } ,
54- {
55- regex : / u n s t a b l e / ,
56- name : GROUP_UNSTABLE ,
57- } ,
58- {
59- regex : / ^ x p u / ,
60- name : GROUP_XPU ,
61- } ,
62- {
63- regex : / i n d u c t o r - p e r i o d i c / ,
64- name : GROUP_INDUCTOR_PERIODIC ,
65- } ,
66- {
67- regex : / p e r i o d i c / ,
68- name : GROUP_PERIODIC ,
69- } ,
70- {
71- regex : / s l o w / ,
72- name : GROUP_SLOW ,
73- } ,
74- {
75- regex : / L i n t / ,
76- name : GROUP_LINT ,
77- } ,
78- {
79- regex : / i n d u c t o r / ,
80- name : GROUP_INDUCTOR ,
81- } ,
82- {
83- regex : / a n d r o i d / ,
84- name : GROUP_ANDROID ,
85- } ,
86- {
87- regex : / r o c m / ,
88- name : GROUP_ROCM ,
89- } ,
90- {
91- regex : / - x l a / ,
92- name : GROUP_XLA ,
93- } ,
94- {
95- regex : / ( \s l i n u x - | s m 8 6 ) / ,
96- name : GROUP_LINUX ,
97- } ,
98- {
99- regex : / l i n u x - b i n a r y / ,
100- name : GROUP_BINARY_LINUX ,
101- } ,
102- {
103- regex : / w i n d o w s - b i n a r y / ,
104- name : GROUP_BINARY_WINDOWS ,
105- } ,
106- {
107- regex :
108- / ( A d d a n n o t a t i o n s ) | ( C l o s e s t a l e p u l l r e q u e s t s ) | ( L a b e l P R s & I s s u e s ) | ( T r i a g e ) | ( U p d a t e S 3 H T M L i n d i c e s ) | ( i s - p r o p e r l y - l a b e l e d ) | ( F a c e b o o k C L A C h e c k ) | ( a u t o - l a b e l - r o c m ) / ,
109- name : GROUP_ANNOTATIONS_AND_LABELING ,
110- } ,
111- {
112- regex :
113- / ( c i \/ c i r c l e c i : d o c k e r - p y t o r c h - ) | ( c i \/ c i r c l e c i : e c r _ g c _ j o b _ ) | ( c i \/ c i r c l e c i : d o c k e r _ f o r _ e c r _ g c _ b u i l d _ j o b ) | ( G a r b a g e C o l l e c t E C R I m a g e s ) / ,
114- name : GROUP_DOCKER ,
115- } ,
116- {
117- regex : / \s w i n - / ,
118- name : GROUP_WINDOWS ,
119- } ,
120- {
121- regex : / \/ c a l c u l a t e - d o c k e r - i m a g e / ,
122- name : GROUP_CALC_DOCKER_IMAGE ,
123- } ,
124- {
125- regex : / d o c k e r - b u i l d s / ,
126- name : GROUP_CI_DOCKER_IMAGE_BUILDS ,
127- } ,
128- {
129- regex : / c i \/ c i r c l e c i : p y t o r c h _ i o s _ / ,
130- name : GROUP_CI_CIRCLECI_PYTORCH_IOS ,
131- } ,
132- {
133- regex : / i o s - / ,
134- name : GROUP_IOS ,
135- } ,
136- {
137- regex : / \s m a c o s - / ,
138- name : GROUP_MAC ,
139- } ,
140- {
141- regex :
142- / ( c i \/ c i r c l e c i : p y t o r c h _ p a r a l l e l n a t i v e _ ) | ( c i \/ c i r c l e c i : p y t o r c h _ p a r a l l e l t b b _ ) | ( p a r a l l e l t b b - l i n u x - ) | ( p a r a l l e l n a t i v e - l i n u x - ) / ,
143- name : GROUP_PARALLEL ,
144- } ,
145- {
146- regex : / ( d o c s p u s h ) | ( d o c s b u i l d ) / ,
147- name : GROUP_DOCS ,
148- } ,
149- {
150- regex : / l i b t o r c h / ,
151- name : GROUP_LIBTORCH ,
152- } ,
153- {
154- // This is a catch-all for jobs that are viable but strict blocking
155- // Excluding linux-binary-* jobs because they are already grouped further up
156- regex : / ( p u l l ) | ( t r u n k ) / ,
157- name : GROUP_OTHER_VIABLE_STRICT_BLOCKING ,
158- } ,
159- ] ;
160-
4+ import { IssueData } from "./types" ;
1615
1626// Accepts a list of group names and returns that list sorted according to
1637// the order defined in HUD_GROUP_SORTING
@@ -181,35 +25,6 @@ export function sortGroupNamesForHUD(
18125 return result ;
18226}
18327
184- export function classifyGroup (
185- jobName : string ,
186- showUnstableGroup : boolean ,
187- unstableIssues ?: IssueData [ ]
188- ) : string {
189- const openUnstableIssues = getOpenUnstableIssues ( jobName , unstableIssues ) ;
190- let assignedGroup = undefined ;
191- for ( const group of groups ) {
192- if ( jobName . match ( group . regex ) ) {
193- assignedGroup = group ;
194- break ;
195- }
196- }
197-
198- // Check if the job has been marked as unstable but doesn't include the
199- // unstable keyword.
200- if ( ! showUnstableGroup && assignedGroup ?. persistent ) {
201- // If the unstable group is not being shown, then persistent groups (mem
202- // leak check, rerun disabled tests) should not be overwritten
203- return assignedGroup . name ;
204- }
205-
206- if ( openUnstableIssues !== undefined && openUnstableIssues . length !== 0 ) {
207- return GROUP_UNSTABLE ;
208- }
209-
210- return assignedGroup === undefined ? GROUP_OTHER : assignedGroup . name ;
211- }
212-
21328export function getGroupConclusionChar ( conclusion ?: GroupedJobStatus ) : string {
21429 switch ( conclusion ) {
21530 case GroupedJobStatus . Success :
0 commit comments