refactor: Phase 2 cleanup — filter extraction, panic fixes, tests#296
Merged
alexei-led merged 2 commits intomasterfrom Feb 18, 2026
Merged
refactor: Phase 2 cleanup — filter extraction, panic fixes, tests#296alexei-led merged 2 commits intomasterfrom
alexei-led merged 2 commits intomasterfrom
Conversation
- Move matchNames, matchPattern, applyContainerFilter from util.go to filter.go - Fix potential panic on empty containerName in matchNames and matchPattern (containerName[1:] panics when containerName is empty string) - Add edge case tests for empty container names - Lint: use containerName != "" instead of len() > 0
- splitLabels: 9 cases (nil, empty, comma-separated, mixed, whitespace) - RunChaosCommand: single run, error propagation, skip-errors, context cancel
Test Results391 tests 389 ✅ 0s ⏱️ Results for commit ee904dc. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #296 +/- ##
==========================================
+ Coverage 45.29% 53.52% +8.23%
==========================================
Files 40 41 +1
Lines 1488 1502 +14
==========================================
+ Hits 674 804 +130
+ Misses 814 698 -116 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Phase 2.4/2.5 cleanup
Filter extraction (Phase 2.5)
matchNames,matchPattern,applyContainerFilterfromutil.gotofilter.goutil.go= listing/random,filter.go= filtering logicBug fixes
matchNamesandmatchPattern(
containerName[1:]panics whencontainerNameis empty string)Test improvements
chaossplitLabels: 9 table-driven casesRunChaosCommand: single run, error propagation, skip-errors, context cancel