Skip to content

ROX-33608: add VirtualMachine v2 converters#19550

Draft
dashrews78 wants to merge 2 commits intodashrews/use-guest-os-constantfrom
dashrews/vm-v2-converters-33608
Draft

ROX-33608: add VirtualMachine v2 converters#19550
dashrews78 wants to merge 2 commits intodashrews/use-guest-os-constantfrom
dashrews/vm-v2-converters-33608

Conversation

@dashrews78
Copy link
Contributor

Add converters extracted from PR #19441 (ROX-33608):

  • internaltostorage.VirtualMachineV2(): sensor-internal VM to storage.VirtualMachineV2,
    extracting GuestOs from facts with "unknown" default
  • v1tov2storage.ScanPartsFromV1Scan(): splits v1 VirtualMachineScan into normalized
    v2 VMScanParts (scan, components, CVEs) with CVSS/NVD extraction, advisory/EPSS
    mapping, and highest-fixed-by version computation

Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

Description

change me!

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

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

…parts

Add converters extracted from PR #19441 (ROX-33608):
- internaltostorage.VirtualMachineV2(): sensor-internal VM to storage.VirtualMachineV2,
  extracting GuestOs from facts with "unknown" default
- v1tov2storage.ScanPartsFromV1Scan(): splits v1 VirtualMachineScan into normalized
  v2 VMScanParts (scan, components, CVEs) with CVSS/NVD extraction, advisory/EPSS
  mapping, and highest-fixed-by version computation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78
Copy link
Contributor Author

dashrews78 commented Mar 23, 2026

@openshift-ci
Copy link

openshift-ci bot commented Mar 23, 2026

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 Mar 23, 2026

Images are ready for the commit at 07beb4c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-411-g07beb4cf52.

Replace direct proto field access (cve.PreferredCvss) with getter
methods (cve.GetPreferredCvss()) to satisfy the protogetter linter.

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 81.73913% with 42 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.29%. Comparing base (3ebf14e) to head (07beb4c).

Files with missing lines Patch % Lines
central/convert/v1tov2storage/vm_scan_parts.go 79.20% 37 Missing and 5 partials ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           dashrews/use-guest-os-constant   #19550      +/-   ##
==================================================================
+ Coverage                           49.26%   49.29%   +0.03%     
==================================================================
  Files                                2727     2729       +2     
  Lines                              205788   206018     +230     
==================================================================
+ Hits                               101375   101557     +182     
- Misses                              96881    96920      +39     
- Partials                             7532     7541       +9     
Flag Coverage Δ
go-unit-tests 49.29% <81.73%> (+0.03%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants