ROX-33555: Add sensor cap checks for SensorAck for node scanning#19418
ROX-33555: Add sensor cap checks for SensorAck for node scanning#19418
Conversation
|
Skipping CI for Draft Pull Request. |
|
This change is part of the following stack: Change managed by git-spice. |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The
recordingInjectorWithCapabilitiestype is duplicated in both nodeinventory and nodeindex tests; consider extracting a shared test helper (or extendingrecordingInjectorwith a defaultHasCapabilityimplementation) to avoid repetition and keep capability behavior consistent across tests. SendSensorACKsilently returns when the injector does not implementcapabilityChecker; if this is expected only for older/non-production injectors, consider documenting that assumption or adding a small debug log/TODO so it’s clearer when SensorACKs might be skipped due to injector type rather than capability.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The `recordingInjectorWithCapabilities` type is duplicated in both nodeinventory and nodeindex tests; consider extracting a shared test helper (or extending `recordingInjector` with a default `HasCapability` implementation) to avoid repetition and keep capability behavior consistent across tests.
- `SendSensorACK` silently returns when the injector does not implement `capabilityChecker`; if this is expected only for older/non-production injectors, consider documenting that assumption or adding a small debug log/TODO so it’s clearer when SensorACKs might be skipped due to injector type rather than capability.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Images are ready for the commit at 71b3ef5. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19418 +/- ##
==========================================
+ Coverage 49.69% 49.72% +0.02%
==========================================
Files 2702 2704 +2
Lines 203538 204051 +513
==========================================
+ Hits 101155 101470 +315
- Misses 94856 95010 +154
- Partials 7527 7571 +44
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
check-generated-files fails with: Not sure how to get rid of that. I will rebase. |
8b9adc1 to
97c2430
Compare
Description
This PR scopes the node-scanning ACK refactor isolated from #19323.
What changed:
central/sensor/service/common/sensor_ack.gowith shared helpers to send:SensorACKNodeInventoryACK(always, for backward compatibility)nodeinventoryACK pathnodeindexACK pathBefore/after behavior example:
SensorACKfor node scanning regardless of Sensor capability.SensorACKfor node scanning only when Sensor advertisesSensorACKSupport; legacyNodeInventoryACKremains emitted for compatibility.User-facing documentation
Testing and quality
Automated testing
How I validated my change
Sensor debug logs:
Sensor metrics:
For Sensor 4.8:
Logs (note no distinction on legacy or the new format):
Metrics (note the lack of capitalized values in message_type):
Central logs (no errors "Failed injecting"):