Minor improvments#243
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (19)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (17)
📝 WalkthroughWalkthroughRunner goroutines now use ChangesWaitGroup.Go refactor across runner workers
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/runner/minimiser_test.go`:
- Around line 204-206: Remove the extra nested goroutine inside the wg.Go
callbacks and call edm.runMinimiser directly within the wg-managed function so
the wait group tracks the actual worker execution. Update both wg.Go usages in
minimiser_test to ensure runMinimiser is part of the lifecycle being waited on,
preserving proper synchronization for wg.Wait and shutdown coverage.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 297a4cb8-eb3d-4f7b-a8d9-741baaecedfb
📒 Files selected for processing (19)
pkg/runner/config_reload_test.gopkg/runner/data_collector.gopkg/runner/data_collector_test.gopkg/runner/disk_cleaner.gopkg/runner/disk_cleaner_test.gopkg/runner/dnstap_input.gopkg/runner/histogram.gopkg/runner/histogram_test.gopkg/runner/manual_parquet_rotation_test.gopkg/runner/minimiser.gopkg/runner/minimiser_test.gopkg/runner/mqtt.gopkg/runner/mqtt_test.gopkg/runner/qname_seen_test.gopkg/runner/service.gopkg/runner/session.gopkg/runner/session_test.gopkg/runner/wkd.gopkg/runner/wkd_test.go
2a4dd45 to
db7cd8d
Compare
move formatting of query and response address and port from hot path and only format them when needed upon error
Since 1.25.0 sync.WaitGroup has a new (prefered) API to simplify
patterns like;
var wg sync.WaitGroup
wg.Add(1)
go func() {
defer wg.Done()
}()
with the use of WaitGroup.Go like;
var wg sync.WaitGroup
wg.Go(func() {})
update the code to use this new API when possible. This makes it easier
to read the code and minimizes potential errors due to
miss-calculations.
db7cd8d to
28c068c
Compare
This PR includes two parts; one fix for removing unnecessary string formatting from the hot-path. The other for switching to using
WaitGroup.Go. See commit messages for more information.Extra eyes would be appreciated on the
WaitGroupchange. Let me know if you would like me to split the commit up into one part per "function" to facilitate the review.Summary by CodeRabbit