fix(roadmap-planner): drop invalid components from DORA metrics#201
Open
yhuan123 wants to merge 1 commit into
Open
fix(roadmap-planner): drop invalid components from DORA metrics#201yhuan123 wants to merge 1 commit into
yhuan123 wants to merge 1 commit into
Conversation
- parseVersionName no longer falls back to the whole version name —
legacy names ("0.3", "v2.1") stop polluting component buckets
- new metrics.exclude_plugins config (D6): v3-era plugins (katanomi,
knative, jenkins, tekton-operator) dropped from all component
dimensions at collection time
- calculators skip component=="" instead of bucketing to "unknown"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The component dimension of DORA metrics is polluted by two classes of invalid data:
parseVersionNamefell back to the whole version name when nocomponent-X.Y.Zpattern matched, so legacy names like0.3,v2.1,1.0each became a bogus component bucket in release_frequency / patch_ratio / lead_time.Fix
parseVersionNamereturns an empty component instead of the whole-name fallback.metrics.exclude_pluginsconfig (implements D6);Collector.dropInvalidComponentReleasesdrops releases with empty or excluded components right after the existingname_regexfilter, so every calculator and theversionDatesmaps stay clean from one place.dropExcludedComponentsstrips D6 plugins from issue/epic component lists (cycle_time, time_to_patch, lead_time).component == ""is skipped instead of bucketed to"unknown".Tests
TestParseVersionName— 9 boundary cases incl.0.3,v2.1,Sprint 2024.TestDropInvalidComponentReleases/TestDropExcludedComponents— both invalid classes.TestReleaseFrequency_SkipsEmptyComponentReleases,TestPatchRatio_SkipsEmptyComponentReleases— lock the calculator guards against silent revert.go test ./internal/metrics/...andgo vetpass.Accepted limitation
An issue whose only components are excluded v3 plugins still lands in the pre-existing
"unknown"bucket of issue-based metrics (documented behavior in METRICS.md) rather than disappearing. Release-side metrics drop such data entirely.Deployment note
exclude_pluginsdefaults to empty — production config must set it (seeconfig.example.yaml) for the D6 exclusion to take effect.🤖 Generated with Claude Code