parser.go ×11

Frontier kind: Joint frontier

unlabeled · c_bc4aece5fbf9

1 test · 58 LOC · 1 file · introduces 1 test · 51 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges51 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
13 ranges58 lines · 1 file · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Introduced files, introduced tests, and structurally relevant concept specializationparser.go ×1 · 1 introduced LOCparser.go ×1parser.go ×1 · 6 introduced LOCparser.go ×1TestOperatorServiceMetadata, TestWorkflowServiceMetadata · 0 introduced LOCTestOperatorServiceMetad…go.temporal.io/server/tools/flakereport/parser.go · 486 LOCflakereport/parser.goTestOperatorServiceMetadata · introduced test · go.temporal.io/server/common/api/TestOperatorServiceMetadataTestOperatorServiceMetad…TestWorkflowServiceMetadata · introduced test · go.temporal.io/server/common/api/TestWorkflowServiceMetadataTestWorkflowServiceMetad…TestGenerateSuiteReports · introduced test · go.temporal.io/server/tools/flakereport/TestGenerateSuiteReportsTestGenerateSuiteReportstest_with_retry_in_name_but_not_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_with_retry_in_name_but_not_suffixtest_with_retry_in_name_…test_with_retry_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_with_retry_suffixtest_with_retry_suffixtest_with_retry_suffix_and_extra_spaces · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_with_retry_suffix_and_extra_spacestest_with_retry_suffix_a…test_without_retry_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestName/test_without_retry_suffixtest_without_retry_suffi…no_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestNameFinal/no_suffixno_suffixretry_with_final_suffix · introduced test · go.temporal.io/server/tools/flakereport/TestNormalizeTestNameFinal/retry_with_final_suffixretry_with_final_suffixFocused concept · parser.go ×11 · 51 introduced LOCparser.go ×11

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 51 introduced LOC across 11 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/tools/flakereport/parser.go 51 introduced LOC · 11 ranges

Open complete file

60 // (starts with "Test" and contains "Suite").
61 // e.g. TestDeploymentVersionSuiteV0, TestFunctionalSuite
62 > func isGoTestSuite(name string) bool { parser.go
63 > return strings.HasPrefix(name, "Test") && strings.Contains(name, "Suite")
64 > }
65
66 // extractFailures extracts all test failures from parsed JUnit data
418 // MatrixNames (DB configs). Keying by (RunID, MatrixName) ensures shards belonging to the
419 // same run+config are counted once, regardless of how many shard JobIDs they produce.
420 > func suiteRunKey(runID int64, matrixName string) string { parser.go
421 > return fmt.Sprintf("%d:%s", runID, matrixName)
422 > }
423
424 // generateSuiteReports creates per-suite flake breakdown from all failures and test runs.
425 // Suite flake rate = % of (CI run × DB config) pairs where the suite had at least one
426 // non-retry failure.
427 > func generateSuiteReports(allFailures []TestFailure, allTestRuns []TestRun) []SuiteReport { parser.go
428 > // Track unique (CI run × DB config) pairs per suite (denominator).
429 > // Using MatrixName avoids the inflation caused by per-shard JobIDs: suites whose
430 > // test methods are spread across N shards would otherwise be counted N times per
431 > // (run × DB config).
432 > suiteRuns := make(map[string]map[string]bool)
433 > for _, run := range allTestRuns {
434 > if run.Skipped || !isGoTestSuite(run.SuiteName) {
435 > continue
436 }
437 > if suiteRuns[run.SuiteName] == nil { parser.go
438 > suiteRuns[run.SuiteName] = make(map[string]bool)
439 > }
440 > suiteRuns[run.SuiteName][suiteRunKey(run.RunID, run.MatrixName)] = true
441 }
442
443 // Track (CI run × DB config) pairs with non-retry failures per suite (numerator)
444 > suiteFailedRuns := make(map[string]map[string]bool) parser.go
445 > suiteLastFailure := make(map[string]time.Time)
446 > for _, failure := range allFailures {
447 > if !isGoTestSuite(failure.SuiteName) {
448 continue
449 }
450 // Only report the original, complete run
451 > if normalizeTestName(failure.Name) != failure.Name { parser.go
452 > continue
453 }
454 > if suiteFailedRuns[failure.SuiteName] == nil { parser.go
455 > suiteFailedRuns[failure.SuiteName] = make(map[string]bool)
456 > }
457 > runKey := suiteRunKey(failure.RunID, failure.MatrixName)
458 > suiteFailedRuns[failure.SuiteName][runKey] = true
459 > if failure.Timestamp.After(suiteLastFailure[failure.SuiteName]) {
460 > suiteLastFailure[failure.SuiteName] = failure.Timestamp
461 > }
462 }
463
464 > var reports []SuiteReport parser.go
465 > for suiteName, runIDs := range suiteRuns {
466 > failedRuns := len(suiteFailedRuns[suiteName])
467 > if failedRuns == 0 {
468 > continue
469 }
470 > totalRuns := len(runIDs) parser.go
471 > flakeRate := float64(failedRuns) / float64(totalRuns) * 100.0
472 > reports = append(reports, SuiteReport{
473 > SuiteName: suiteName,
474 > FlakeRate: flakeRate,
475 > FailedRuns: failedRuns,
476 > TotalRuns: totalRuns,
477 > LastFailure: suiteLastFailure[suiteName],
478 > })
479 }
480
481 > sort.Slice(reports, func(i, j int) bool { parser.go
482 > return reports[i].SuiteName < reports[j].SuiteName
483 > })
484
485 > return reports parser.go
486 }