Skip to content

ROX-32316: New proto message for ACKs to Sensor#18215

Merged
vikin91 merged 5 commits intomasterfrom
piotr/ROX-32316-sensor-ack
Jan 8, 2026
Merged

ROX-32316: New proto message for ACKs to Sensor#18215
vikin91 merged 5 commits intomasterfrom
piotr/ROX-32316-sensor-ack

Conversation

@vikin91
Copy link
Contributor

@vikin91 vikin91 commented Dec 15, 2025

Description

This PR adds an unified proto message for ACK from Central to Sensor. So far, we have specialized ACK messages for Node Inventories and Node Indexes - named NodeInventoryACK. In this PR, we introduce a new type of message - central.SensorACK - that is not bound to a particular feature and can be used for other ACK flows in the future.

Additionally, we do the same for ACKs sent from Sensor to Compliance by adding message sensor.ComplianceACK. Moreover, we add Sensor capability SensorACKSupport, so that Central can recognize whether the connected Sensor supports the new message format.

Motivation: this is the foundation for rate limiting of VM index reports. Scanner V4 can only process ~3 VM index reports per second, and exceeding this causes unbounded queue growth in Central leading to OOM kills. This change introduces new generic ACK/NACK messages and configuration without changing behavior.

What changed:

  • Added central.SensorACK message for Central → Sensor acknowledgements
  • Added sensor.ComplianceACK message for Sensor → Compliance acknowledgements
  • Deprecated central.NodeInventoryACK and sensor.NodeInventoryACK (will be kept until 4.12)
  • Added SensorACKSupport capability for version negotiation

Why separate ACK messages:
The two channels (Central↔Sensor vs Sensor↔Compliance) use separate protobuf packages. Having separate SensorACK and ComplianceACK messages avoids cross-package imports while maintaining clean separation of concerns.

Backward compatibility:
Central will check conn.HasCapability(SensorACKSupport) and use SensorACK only if present, otherwise fall back to NodeInventoryACK. This enables safe rolling upgrades with no crashes when Central 4.10 talks to Sensor 4.9.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

No automated tests added. This is a foundation PR with only protobuf definitions and configuration. No runtime behavior changes.

How I validated my change

  • CI (including proto checks)

Manual inspection:

  • Verified generated Go code includes SensorACK and ComplianceACK types
  • Confirmed deprecation markers present on both NodeInventoryACK messages
  • Checked capability constant follows existing patterns in caps_list.go
  • Verified environment variables follow naming conventions

Why no runtime testing:
This PR only adds unused protobuf definitions and configuration. Actual functionality will be tested in subsequent PRs when rate limiting is implemented and integrated.


AI contribution: Generated protobuf message definitions, capability constant, environment variable configuration, and performed protobuf regeneration.

User contribution: Refined comment formatting, added deprecation timeline (remove in 4.12), clarified that two separate ACK messages avoid cross-imports, and validated compilation.

@vikin91
Copy link
Contributor Author

vikin91 commented Dec 15, 2025

@openshift-ci
Copy link

openshift-ci bot commented Dec 15, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Dec 15, 2025

Images are ready for the commit at 129b43e.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.10.x-685-g129b43ed3f.

@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.89%. Comparing base (44fadf8) to head (129b43e).
⚠️ Report is 44 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #18215      +/-   ##
==========================================
+ Coverage   48.85%   48.89%   +0.04%     
==========================================
  Files        2624     2626       +2     
  Lines      198125   198224      +99     
==========================================
+ Hits        96789    96919     +130     
+ Misses      93939    93912      -27     
+ Partials     7397     7393       -4     
Flag Coverage Δ
go-unit-tests 48.89% <ø> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vikin91 vikin91 force-pushed the piotr/ROX-32316-sensor-ack branch from 225c6d4 to 92246b0 Compare December 17, 2025 15:56
@vikin91 vikin91 force-pushed the piotr/ROX-32316-sensor-ack branch from 92246b0 to 54faf82 Compare December 18, 2025 11:33
…iting

Scanner V4 can only process ~3 VM index reports/sec; exceeding this causes
unbounded queue growth in Central leading to OOM. This commit adds the
foundation for rate limiting with ACK/NACK feedback:

- Added central.SensorACK message (Central → Sensor channel)
- Added sensor.ComplianceACK message (Sensor → Compliance channel)
- Deprecated central.NodeInventoryACK and sensor.NodeInventoryACK
  (kept for backward compatibility until 4.12)
- Added SensorACKSupport capability for version negotiation
- Added configuration: ROX_VM_INDEX_REPORT_RATE_LIMIT (default: 0/disabled)
  and ROX_VM_INDEX_REPORT_BURST_DURATION (default: 5s)

No behavior changes in this commit. Rate limiting implementation follows in
subsequent PRs.

The two ACK messages are intentionally separate to avoid cross-imports
between central and sensor protobuf packages.

AI generated: Protobuf message definitions, capability constant, environment
variable configuration, and protobuf regeneration.
User corrected: Comment spacing, deprecation timeline (4.12), and deprecation
notices for clarity.
@vikin91 vikin91 force-pushed the piotr/ROX-32316-sensor-ack branch from 54faf82 to 4395143 Compare January 2, 2026 14:29
@vikin91 vikin91 marked this pull request as ready for review January 6, 2026 09:48
@vikin91 vikin91 requested a review from a team as a code owner January 6, 2026 09:48
@vikin91 vikin91 changed the title ROX-32316: Proto for VMVM rate limitng and ACKs ROX-32316: New proto message for ACKs to Sensor Jan 6, 2026
@vikin91
Copy link
Contributor Author

vikin91 commented Jan 6, 2026

/retest

@vikin91 vikin91 merged commit a45f305 into master Jan 8, 2026
154 of 180 checks passed
@vikin91 vikin91 deleted the piotr/ROX-32316-sensor-ack branch January 8, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants