Stop docker watcher in docker autodiscover#50578
Stop docker watcher in docker autodiscover#50578belimawr wants to merge 1 commit intoelastic:mainfrom
Conversation
The docker watcher in the docker autodiscover was not stopped and the Provider Stop method did not wait the provider goroutines to return. That caused two problems: - improper shutdown - tests using the testing.T as logger output could panic. This commit fixes it by calling stop in the watcher and waiting all started goroutines to finish.
🤖 GitHub commentsJust comment with:
|
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds graceful shutdown coordination to the Docker autodiscover provider. The change introduces a 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Proposed commit message
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesstresstest.shscript to run them under stress conditions and race detector to verify their stability.I have added an entry in./changelog/fragmentsusing the changelog tool.## Disruptive User ImpactHow to test this PR locally
Run the tests, use
-count=2or a larger valueRelated issues
panic: Log in goroutine after TestDockerStart has completed#50545## Use cases## Screenshots## Logs