Skip to content

Commit a655183

Browse files
authored
fix(ci-dashboard): refine external dependency classification (#461)
## Summary - prefer explicit realtikv duplicate-key evidence over earlier Bazel fetch noise in realcluster and ghpr_check2 logs - classify Bazel remote cache 429/SlowDown as `INFRA/NETWORK` instead of `INFRA/EXTERNAL_DEP` - add rule-engine coverage for the mixed-log regression cases ## Verification - `uv run --with pytest --python 3.11 python -m pytest tests/jobs/test_rule_engine.py -k 'realcluster or remote_cache or ghpr_check2 or external_dependency'`
1 parent 64d0270 commit a655183

3 files changed

Lines changed: 640 additions & 14 deletions

File tree

ci-dashboard/src/ci_dashboard/jobs/error_classification_guidance.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@
77
- Stage names or wrapper steps such as "prepare depends", "build", or generic pipeline/config steps are weak hints; classify the underlying compiler, dependency, test, or merge evidence instead.
88
- In this autoscaled CI environment, FailedScheduling/Unschedulable/Insufficient resources/taints/PVC waits during pod Pending are normal scheduling pressure, not an error by themselves.
99
- Only classify Kubernetes as INFRA when there is final pod/container failure evidence such as TerminationByKubelet, OOMKilled, or Evicted.
10+
- Do not classify K8S_MEMORY_EVICTION from partial memory-usage snippets alone; require final kubelet pod-failure evidence such as `Pod [Failed][TerminationByKubelet] The node was low on resource: memory`.
1011
- Container termination reason OOMKilled is INFRA/OOMKILLED, even when Jenkins later reports a matrix branch failure or agent disconnect.
1112
- Use job names as strong hints for test families: ghpr/pull unit/mysql jobs are UT, integration/realcluster/lightning/br/dm integration jobs are IT.
1213
- ghpr_check2 test-failure evidence should usually stay in the UT family because that job behaves like a unit-style mixed check job; do not move it to IT unless the failing evidence is explicitly integration-specific.
1314
- ghpr_check2 timeout evidence can move to IT/TIMEOUT when the failing branch is explicitly integration-specific, for example `run_real_tikv_tests.sh ...` or `integrationtest_with_tikv.sh ...`, even though the outer job name is ghpr_check2.
1415
- ghpr_check2 realtikv/integration failure evidence such as `//tests/realtikvtest/... FAILED`, `Test output for //tests/realtikvtest/...`, or PD `NOT_BOOTSTRAPPED` errors inside `run_real_tikv_tests.sh` or `integrationtest_with_tikv.sh` branches should be IT/TEST_FAILURE, not UT/TEST_FAILURE.
16+
- pull/release `pull_check2` jobs with explicit `realtikv` target failures such as `//tests/realtikvtest/... FAILED`, `Test output for //tests/realtikvtest/...`, or PD `NOT_BOOTSTRAPPED` errors should also be IT/TEST_FAILURE rather than OTHERS/UNCLASSIFIED.
17+
- In realcluster or ghpr_check2 mixed logs, explicit add-index/import-into duplicate-key evidence such as `[kv:1062]Duplicate entry`, `ErrFoundDuplicateKey`, or `run add index job failed, convert job to rollback` should be IT/TEST_FAILURE even if the same console earlier contains Bazel dependency download failures.
1518
- Go compiler errors such as "undefined:" or "has no field or method" are BUILD/COMPILE, even when they appear inside Bazel or wrapper output.
1619
- Bazel/unit summaries such as "FAILED TO BUILD", "fails to build", or "0 failing out of 0 test cases" point to an upstream build problem, not a UT test failure by themselves.
1720
- Failpoint rewrite/parser errors such as "Rewrite error ... expected declaration/statement, found '<<'" are BUILD/COMPILE.
@@ -22,14 +25,24 @@
2225
- Support-repo checkout failures that log `computeBranchFromPR component: tidb-test`, warn that the `tidb-test` PR base branch must match the `tidb` PR base branch, and then fail with `fatal: couldn't find remote ref refs/heads/...` are BUILD/PIPELINE_CONFIG; treat them as CI checkout/refspec logic failures rather than INFRA/GIT noise.
2326
- Direct main-repo checkout failures such as `fatal: couldn't find remote ref refs/pull/<num>/head` are INFRA/GIT, not BUILD/PIPELINE_CONFIG; they often reflect a transient GitHub pull-ref visibility issue, and later matrix or agent noise should be ignored.
2427
- Nogo or build-time static-analysis validation failures such as "Validating nogo output" or "Running nogo on //... failed" are BUILD/FORMAT_CHECK, including ghpr_build, ghpr_check2, pull_build_next_gen, and pull_unit_test jobs; do not leave them in BUILD/PIPELINE_CONFIG or move them to BUILD/COMPILE.
28+
- This also applies when those `nogo` / `Validating nogo output` failures happen inside integration-family wrappers such as `pull_integration_realcluster_test_next_gen`; they are still BUILD/FORMAT_CHECK.
2529
- Repository/archive download failures such as "Error downloading", "Error computing the main repository mapping", download 404/429/502/503/504, or read-timeout while fetching Bazel/GitHub dependencies are INFRA/EXTERNAL_DEP even if matrix branches later show test interruptions.
30+
- Bazel remote-cache throttling evidence such as `Remote Cache: 429 Too Many Requests`, `Failed to fetch blobs because of a remote cache error`, or GCS `SlowDown ... exceeded your bucket's IO capacity` is INFRA/NETWORK rather than INFRA/EXTERNAL_DEP.
31+
- Bazel server failures such as `Server terminated abruptly (error code: 14, error message: 'Socket closed')` are INFRA/NETWORK when there is no earlier stronger build/test root cause.
2632
- For integration job families, Jenkins/test wrapper timeout evidence such as "Timeout has been exceeded" is IT/TIMEOUT, not INFRA/NETWORK.
2733
- BR integration matrix TEST_GROUP failures are IT/TEST_FAILURE, even if the failed case logs local 127.0.0.1 PD/TiKV connection-refused or timeout symptoms.
34+
- merged integration matrix failures should usually stay in IT/TEST_FAILURE when the failed branch also shows concrete product/test evidence such as `TEST FAILED`, duplicate-key exceptions, JDBC assertion failures, BR store-backup failures, or local service connection-refused inside the test workload.
35+
- `merged_integration_mysql_test` query/result mismatches such as `query succeeded, but expected error(s)!` or `query failed with non expected error(s)!` are IT/TEST_FAILURE.
2836
- BR restore compatibility failures such as "ErrRestoreNotFreshCluster", "ErrRestoreIncompatibleSys", "missing column in cluster data", or "incompatible column, table:" are IT/TEST_FAILURE, even if later console tail shows scatter warnings or Jenkins remoting noise.
37+
- For `pull_cdc_storage_integration_light`, matrix `TEST_GROUP` failures with `TEST FAILED`, `check diff failed`, `check data failed`, or `run task failed` are IT/TEST_FAILURE, even if the same build also had transient Pending/PVC scheduling noise.
38+
- For `pull_cdc_storage_integration_heavy_next_gen`, matrix/data-check failures such as `check diff failed`, `ErrTableIsNotFounded`, or `ErrMaintainerNotFounded` are IT/TEST_FAILURE.
39+
- For `ghpr_check`, `make ... integrationtest` failures with plan diff or integration output mismatch evidence are IT/TEST_FAILURE rather than INFRA/NETWORK.
2940
- Kubelet final pod failures such as `TerminationByKubelet` with `imminent node shutdown` are INFRA/K8S and should beat later Jenkins remoting or agent-offline noise.
3041
- Jenkins Groovy/runtime/cache/websocket/controller persistence errors are INFRA subcategories, not product BUILD failures.
42+
- If a log first shows checkout interruption or agent-loss evidence such as `ERROR: Checkout failed`, `java.lang.InterruptedException`, or `AgentOfflineException: Unable to create live FilePath`, and only later shows `groovy.lang.MissingPropertyException: No such property: source`, prefer INFRA/JENKINS_AGENT_OFFLINE over INFRA/JENKINS_GROOVY.
3143
- Agent disconnect/remoting failures such as `Timeout waiting for agent to come back`, `AgentOfflineException`, or `was marked offline: Connection was broken` are INFRA/JENKINS_AGENT_OFFLINE when there is no earlier stronger root cause.
3244
- Disk-full evidence such as "No space left on device" is INFRA/DISK_FULL even when it appears while Jenkins saves pipeline state.
45+
- TiDB ingest environment errors such as `Error 8256 (HY000): Check ingest environment failed: no enough space in /tmp/tidb/...` are also INFRA/DISK_FULL.
3346
- Prow superseded aborts are OTHERS/SUPERSEDED_BY_NEWER_BUILD when Prow marks the job aborted because a newer same-PR same-job version is running, or when an admin-abort log has same-PR same-job newer different-SHA build evidence; this overrides downstream noise.
3447
- Admin aborts are OTHERS/ABORT_BY_ADMIN and override downstream matrix, network, or interrupted-process symptoms.
3548
- Merge conflicts such as "CONFLICT (content)" or "Automatic merge failed" are OTHERS/CODE_CONFLICT, because they are neither infra nor product test/build quality failures.

ci-dashboard/src/ci_dashboard/jobs/error_taxonomy.json

Lines changed: 143 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
"l2": "DISK_FULL",
8080
"text_patterns": [
8181
"java\\.io\\.IOException: No space left on device",
82-
"No space left on device"
82+
"No space left on device",
83+
"Error 8256 \\(HY000\\): Check ingest environment failed: no enough space in /tmp/tidb/"
8384
]
8485
},
8586
{
@@ -98,20 +99,34 @@
9899
"l2": "K8S_MEMORY_EVICTION",
99100
"text_patterns": [
100101
"Pod \\[Failed\\]\\[TerminationByKubelet\\] The node was low on resource: memory",
101-
"The node was low on resource: memory\\.[\\s\\S]*Container .* was using .* request is .* larger consumption of memory",
102-
"Container .* was using .* request is .* larger consumption of memory"
102+
"Pod \\[Failed\\]\\[TerminationByKubelet\\] The node was low on resource: memory\\.[\\s\\S]*Container .* was using .* request is .* larger consumption of memory"
103103
]
104104
},
105105
{
106106
"name": "realcluster_statistics_duplicate_key_test_failure",
107107
"l1": "IT",
108108
"l2": "TEST_FAILURE",
109109
"job_name_patterns": [
110+
"(^|/)ghpr_check2$",
111+
"(^|_)ghpr_check2($|_)",
110112
"(^|/)pull_integration_realcluster_test(_next_gen)?$",
111113
"(^|_)pull_integration_realcluster_test(_next_gen)?($|_)"
112114
],
113115
"text_patterns": [
114-
"Failed in branch Matrix - SCRIPT_AND_ARGS = 'tests/realtikvtest/scripts/next-gen/run-tests\\.sh bazel_statisticstest'[\\s\\S]*Duplicate entry [^\\r\\n]+ for key '(?:t\\.idx|t0\\.idx1)'"
116+
"Failed in branch Matrix - SCRIPT_AND_ARGS = 'tests/realtikvtest/scripts/next-gen/run-tests\\.sh bazel_statisticstest'[\\s\\S]*Duplicate entry [^\\r\\n]+ for key '(?:t\\.idx|t0\\.idx1)'",
117+
"Failed in branch Matrix - SCRIPT_AND_ARGS = '(?:tests/realtikvtest/scripts/next-gen/run-tests\\.sh|run_real_tikv_tests\\.sh) bazel_(?:addindextest[0-9]*|importintotest[0-9]*)'[\\s\\S]*(?:\\[kv:1062\\]Duplicate entry|ErrFoundDuplicateKey|run add index job failed, convert job to rollback)",
118+
"Test output for //tests/realtikvtest/[^\\r\\n]+[\\s\\S]*(?:\\[kv:1062\\]Duplicate entry|ErrFoundDuplicateKey|run add index job failed, convert job to rollback)",
119+
"//tests/realtikvtest/[^\\r\\n]+ FAILED in [\\s\\S]*(?:\\[kv:1062\\]Duplicate entry|ErrFoundDuplicateKey|run add index job failed, convert job to rollback)"
120+
]
121+
},
122+
{
123+
"name": "infra_remote_cache_throttle_network",
124+
"l1": "INFRA",
125+
"l2": "NETWORK",
126+
"text_patterns": [
127+
"Remote Cache: 429 Too Many Requests",
128+
"Failed to fetch blobs because of a remote cache error\\.: 429 Too Many Requests",
129+
"SlowDown[^\\r\\n]*exceeded your bucket's IO capacity"
115130
]
116131
},
117132
{
@@ -152,11 +167,13 @@
152167
"(^|/)ghpr_check2$",
153168
"(^|/)ghpr_build$",
154169
"(^|/)pull_build_next_gen$",
170+
"(^|/)pull_integration_realcluster_test(_next_gen)?$",
155171
"(^|/)ghpr_unit_test$",
156172
"(^|/)pull_unit_test[^/]*$",
157173
"(^|_)ghpr_check2($|_)",
158174
"(^|_)ghpr_build($|_)",
159175
"(^|_)pull_build_next_gen($|_)",
176+
"(^|_)pull_integration_realcluster_test(_next_gen)?($|_)",
160177
"(^|_)ghpr_unit_test($|_)",
161178
"(^|_)pull_unit_test($|_)"
162179
],
@@ -171,7 +188,9 @@
171188
"l2": "TEST_FAILURE",
172189
"job_name_patterns": [
173190
"(^|/)ghpr_check2$",
174-
"(^|_)ghpr_check2($|_)"
191+
"(^|/)pull_check2[^/]*$",
192+
"(^|_)ghpr_check2($|_)",
193+
"(^|_)pull_check2($|_)"
175194
],
176195
"text_patterns": [
177196
"//tests/realtikvtest/[^\\r\\n]+ FAILED in ",
@@ -193,9 +212,12 @@
193212
],
194213
"text_patterns": [
195214
"Testing //[^\\r\\n]+ failed: Test failed",
215+
"FAIL: //[^\\r\\n]+_test",
196216
"Test cases: finished with [^\\r\\n]*[1-9][0-9]* failing",
197217
"Build completed, [1-9][0-9]* test FAILED",
198218
"Executed [0-9]+ out of [0-9]+ test: [^\\r\\n]*fails locally",
219+
"testdata: Errors on loading test data from file:",
220+
"panic: runtime error: invalid memory address or nil pointer dereference",
199221
"//tests/realtikvtest/[^\\r\\n]+ FAILED in ",
200222
"--- FAIL: "
201223
]
@@ -206,7 +228,9 @@
206228
"l2": "TIMEOUT",
207229
"job_name_patterns": [
208230
"(^|/)ghpr_check2$",
209-
"(^|_)ghpr_check2($|_)"
231+
"(^|/)pull_check2[^/]*$",
232+
"(^|_)ghpr_check2($|_)",
233+
"(^|_)pull_check2($|_)"
210234
],
211235
"text_patterns": [
212236
"Timeout has been exceeded[\\s\\S]*(run_real_tikv_tests\\.sh|integrationtest_with_tikv\\.sh)",
@@ -332,6 +356,38 @@
332356
"run task failed [1-9][0-9]*-th time"
333357
]
334358
},
359+
{
360+
"name": "cdc_storage_integration_heavy_next_gen_test_failure",
361+
"l1": "IT",
362+
"l2": "TEST_FAILURE",
363+
"job_name_patterns": [
364+
"(^|/)pull_cdc_storage_integration_heavy_next_gen$",
365+
"(^|_)pull_cdc_storage_integration_heavy_next_gen($|_)"
366+
],
367+
"text_patterns": [
368+
"Failed in branch Matrix - TEST_GROUP = '[^']+'",
369+
"check diff failed [1-9][0-9]*-th time",
370+
"\\[CDC:ErrTableIsNotFounded\\]table is not found",
371+
"\\[CDC:ErrMaintainerNotFounded\\]maintainer is not found"
372+
]
373+
},
374+
{
375+
"name": "cdc_storage_integration_light_test_failure",
376+
"l1": "IT",
377+
"l2": "TEST_FAILURE",
378+
"job_name_patterns": [
379+
"(^|/)pull_cdc_storage_integration_light$",
380+
"(^|_)pull_cdc_storage_integration_light($|_)"
381+
],
382+
"text_patterns": [
383+
"Failed in branch Matrix - TEST_GROUP = '[^']+'",
384+
"TEST FAILED: OUTPUT DOES NOT CONTAIN",
385+
"TEST FAILED: OUTPUT CONTAINS",
386+
"check data failed [1-9][0-9]*-th time",
387+
"check diff failed [1-9][0-9]*-th time",
388+
"run task failed [1-9][0-9]*-th time"
389+
]
390+
},
335391
{
336392
"name": "cdc_integration_kafka_test_failure",
337393
"l1": "IT",
@@ -360,6 +416,49 @@
360416
"make: \\*\\*\\* \\[Makefile:[0-9]+: push-down-test\\] Error [0-9]+"
361417
]
362418
},
419+
{
420+
"name": "merged_integration_mysql_test_failure",
421+
"l1": "IT",
422+
"l2": "TEST_FAILURE",
423+
"job_name_patterns": [
424+
"(^|/)merged_integration_mysql_test$",
425+
"(^|_)merged_integration_mysql_test($|_)"
426+
],
427+
"text_patterns": [
428+
"query succeeded, but expected error\\(s\\)!",
429+
"query failed with non expected error\\(s\\)!",
430+
"Failed in branch Matrix - TEST_PART = '[^']+'"
431+
]
432+
},
433+
{
434+
"name": "merged_unit_test_failure",
435+
"l1": "UT",
436+
"l2": "TEST_FAILURE",
437+
"job_name_patterns": [
438+
"(^|/)merged_unit_test$",
439+
"(^|_)merged_unit_test($|_)"
440+
],
441+
"text_patterns": [
442+
"=== FAIL:",
443+
"--- FAIL:",
444+
"Received unexpected error: Get \\\"http://127\\.0\\.0\\.1:[0-9]+/metrics\\\":"
445+
]
446+
},
447+
{
448+
"name": "merged_integration_matrix_test_failure",
449+
"l1": "IT",
450+
"l2": "TEST_FAILURE",
451+
"job_name_patterns": [
452+
"(^|/)merged_integration_.*_test$",
453+
"(^|_)merged_integration_.*_test($|_)"
454+
],
455+
"text_patterns": [
456+
"Failed in branch Matrix - [^\\r\\n]+[\\s\\S]*TEST FAILED: OUTPUT (?:DOES NOT CONTAIN|CONTAINS)",
457+
"Failed in branch Matrix - [^\\r\\n]+[\\s\\S]*org\\.jooq\\.exception\\.DataAccessException: SQL \\[[^\\r\\n]+Duplicate entry",
458+
"Failed in branch Matrix - [^\\r\\n]+[\\s\\S]*SQLIntegrityConstraintViolationException: Duplicate entry",
459+
"Failed in branch Matrix - [^\\r\\n]+[\\s\\S]*(?:retryable storage error|store backup failed|\\[BR:Common:ErrFailedToConnect\\] failed to make connection to store|\\[health check\\] check health error)"
460+
]
461+
},
363462
{
364463
"name": "merged_integration_cleanup_pipeline_config_failure",
365464
"l1": "BUILD",
@@ -409,23 +508,42 @@
409508
"\\.go:[0-9]+:[0-9]+: .* undefined( \\(type .*\\))?",
410509
"\\.go:[0-9]+:[0-9]+: cannot use .* as .*",
411510
"\\.go:[0-9]+:[0-9]+: .* does not implement .*",
511+
"\\.go:[0-9]+:[0-9]+: unknown field ",
412512
"\\.go:[0-9]+:[0-9]+: too many arguments in call to",
413513
"\\.go:[0-9]+:[0-9]+: not enough arguments in call to",
414514
"Rewrite error [^\\r\\n]+\\.go:[0-9]+:[0-9]+: expected (statement|declaration), found ",
415515
"plugin\\.Open\\([^\\r\\n]+\\): plugin was built with a different version of package "
416516
]
417517
},
518+
{
519+
"name": "ghpr_check_integrationtest_failure",
520+
"l1": "IT",
521+
"l2": "TEST_FAILURE",
522+
"job_name_patterns": [
523+
"(^|/)ghpr_check$",
524+
"(^|_)ghpr_check($|_)"
525+
],
526+
"text_patterns": [
527+
"diff:[\\s\\S]*make: \\*\\*\\* \\[Makefile:[0-9]+: integrationtest\\] Error [0-9]+",
528+
"make: \\*\\*\\* \\[Makefile:[0-9]+: integrationtest\\] Error [0-9]+"
529+
]
530+
},
418531
{
419532
"name": "build_codegen_failure",
420533
"l1": "BUILD",
421534
"l2": "CODEGEN",
422535
"job_name_patterns": [
423536
"(^|/)ghpr_check$",
537+
"(^|/)pull_check[^/]*$",
424538
"(^|_)ghpr_check($|_)"
539+
,
540+
"(^|_)pull_check($|_)"
425541
],
426542
"text_patterns": [
427543
"Your commit is changed after running go generate \\./\\.\\.\\., it should not happen\\.",
428-
"make: \\*\\*\\* \\[Makefile:[0-9]+: gogenerate\\] Error [0-9]+"
544+
"make: \\*\\*\\* \\[Makefile:[0-9]+: gogenerate\\] Error [0-9]+",
545+
"Files go\\.sum and /tmp/go\\.sum\\.before differ",
546+
"make: \\*\\*\\* \\[Makefile:[0-9]+: tidy\\] Error [0-9]+"
429547
]
430548
},
431549
{
@@ -453,7 +571,9 @@
453571
"hudson\\.FilePath\\.readFromTar\\(FilePath\\.java:[0-9]+\\)[\\s\\S]*Caused: java\\.io\\.IOException: Failed to extract input stream",
454572
"Caused: java\\.io\\.IOException: Failed to extract input stream[\\s\\S]*hudson\\.FilePath\\.readFromTar\\(FilePath\\.java:[0-9]+\\)",
455573
"Caused: java\\.io\\.IOException: Failed to extract input stream[\\s\\S]*jenkins-pipeline-cache",
456-
"org\\.apache\\.http\\.ConnectionClosedException: Premature end of Content-Length delimited message body[\\s\\S]*jenkins-pipeline-cache"
574+
"org\\.apache\\.http\\.ConnectionClosedException: Premature end of Content-Length delimited message body[\\s\\S]*jenkins-pipeline-cache",
575+
"Workspace has a \\.git repository, but it appears to be corrupt\\.",
576+
"fatal: not a gitdir "
457577
]
458578
},
459579
{
@@ -465,7 +585,8 @@
465585
"okhttp3\\.internal\\.ws\\.WebSocketReader",
466586
"okhttp3\\.internal\\.ws\\.RealWebSocket",
467587
"java\\.io\\.EOFException[\\s\\S]*okhttp3\\.internal\\.ws",
468-
"ERROR: Process exited immediately after creation\\.[\\s\\S]*websocket"
588+
"ERROR: Process exited immediately after creation\\.[\\s\\S]*websocket",
589+
"Server terminated abruptly \\(error code: 14, error message: 'Socket closed'\\)"
469590
]
470591
},
471592
{
@@ -481,6 +602,19 @@
481602
"ERROR: internal error performing authentication[\\s\\S]*fatal: Could not read from remote repository\\."
482603
]
483604
},
605+
{
606+
"name": "infra_jenkins_agent_offline_before_groovy_missing_property",
607+
"l1": "INFRA",
608+
"l2": "JENKINS_AGENT_OFFLINE",
609+
"job_name_patterns": [
610+
"(^|/)merged_sqllogic_test$",
611+
"(^|_)merged_sqllogic_test($|_)"
612+
],
613+
"text_patterns": [
614+
"AgentOfflineException: Unable to create live FilePath[\\s\\S]*groovy\\.lang\\.MissingPropertyException: No such property: source",
615+
"ERROR: Checkout failed[\\s\\S]*java\\.lang\\.InterruptedException[\\s\\S]*groovy\\.lang\\.MissingPropertyException: No such property: source"
616+
]
617+
},
484618
{
485619
"name": "infra_jenkins_groovy",
486620
"l1": "INFRA",
@@ -549,7 +683,6 @@
549683
"l2": "EXTERNAL_DEP",
550684
"text_patterns": [
551685
"rate limit exceeded",
552-
"429 Too Many Requests",
553686
"502 Bad Gateway",
554687
"503 Service Unavailable",
555688
"upstream connect error"

0 commit comments

Comments
 (0)