Make AgentManagerImpl.handleCommands resilient to listener exceptions - #13788
Open
Damans227 wants to merge 1 commit into
Open
Make AgentManagerImpl.handleCommands resilient to listener exceptions#13788Damans227 wants to merge 1 commit into
Damans227 wants to merge 1 commit into
Conversation
…steners and ensuring downstream listeners are invoked. Add tests to verify behavior with null hostId and exception handling.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13788 +/- ##
=========================================
Coverage 19.65% 19.65%
- Complexity 19792 19798 +6
=========================================
Files 6368 6368
Lines 574881 574887 +6
Branches 70351 70351
=========================================
+ Hits 112970 112999 +29
+ Misses 449639 449614 -25
- Partials 12272 12274 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 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.
Description
If one listener in
handleCommandsthrows, the whole loop stops and every listener after it never runs. This can starvepingBy()and cause fake ping timeouts.This wraps each listener call in a try/catch, so one bad listener just logs a warning and the rest still run. Also fixed a trace log nearby that was logging the wrong class (the
Pairwrapper instead of the listener).Also added the missing
hostIdfield toIdsPowerStateSelectSearch. Without it, VMs loaded through that path always showed a null host, even when they had one. Not a crash, just a wrong log message.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
Added tests: a throwing listener doesn't block the next one, and existing behavior with only successful listeners is unchanged. Also added tests for the null-hostId case, which had no coverage before.