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 8b9adc1. To use with deploy scripts, first |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19418 +/- ##
==========================================
- Coverage 49.71% 49.70% -0.01%
==========================================
Files 2701 2702 +1
Lines 203453 203465 +12
==========================================
- Hits 101144 101140 -4
- Misses 94782 94805 +23
+ Partials 7527 7520 -7
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:
|
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