Skip to content

ROX-33384: Add VM v2 CVE DataStore#19434

Open
dashrews78 wants to merge 3 commits intomasterfrom
dashrews/vm-v2-cve-datastore-33384
Open

ROX-33384: Add VM v2 CVE DataStore#19434
dashrews78 wants to merge 3 commits intomasterfrom
dashrews/vm-v2-cve-datastore-33384

Conversation

@dashrews78
Copy link
Contributor

@dashrews78 dashrews78 commented Mar 16, 2026

Description

Add read-only DataStore for VirtualMachineCVEV2, modeled after the
image CVE v2 datastore. The singleton is gated behind the
VirtualMachinesEnhancedDataModel feature flag, returning nil when
disabled.

Integration tests cover all DataStore methods (Search, SearchRawVMCVEs,
Exists, Get, Count, GetBatch) under 10 namespace-scoped SAC contexts
plus denied-access and feature-flag gating scenarios.

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

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

CI and new tests are sufficient. Tests were exercised manually with the feature flag on. More thorough testing will be included later when we finish wiring everything together.

@dashrews78
Copy link
Contributor Author

dashrews78 commented Mar 16, 2026

This change is part of the following stack:

Change managed by git-spice.

@openshift-ci
Copy link

openshift-ci bot commented Mar 16, 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 16, 2026

Images are ready for the commit at 828841c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-344-g828841c4c7.

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.37%. Comparing base (16dac47) to head (828841c).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
.../virtualmachine/cve/v2/datastore/datastore_impl.go 0.00% 38 Missing ⚠️
...ntral/virtualmachine/cve/v2/datastore/singleton.go 0.00% 9 Missing ⚠️
...ntral/virtualmachine/cve/v2/datastore/datastore.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19434      +/-   ##
==========================================
- Coverage   49.38%   49.37%   -0.02%     
==========================================
  Files        2713     2716       +3     
  Lines      204925   204980      +55     
==========================================
- Hits       101206   101204       -2     
- Misses      96191    96245      +54     
- Partials     7528     7531       +3     
Flag Coverage Δ
go-unit-tests 49.37% <0.00%> (-0.02%) ⬇️

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.

@dashrews78 dashrews78 marked this pull request as ready for review March 16, 2026 13:55
@dashrews78 dashrews78 requested a review from ajheflin March 16, 2026 14:28
dashrews78 and others added 3 commits March 17, 2026 06:37
Add read-only DataStore for VirtualMachineCVEV2, modeled after the
image CVE v2 datastore. The singleton is gated behind the
VirtualMachinesEnhancedDataModel feature flag, returning nil when
disabled.

Integration tests cover all DataStore methods (Search, SearchRawVMCVEs,
Exists, Get, Count, GetBatch) under 10 namespace-scoped SAC contexts
plus denied-access and feature-flag gating scenarios.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add defer metrics.SetDatastoreFunctionDuration calls to all CVE
datastore methods, matching the pattern used by the VM v2 datastore.
Gate the CVE datastore integration tests on the
VirtualMachinesEnhancedDataModel feature flag.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dashrews78 dashrews78 force-pushed the dashrews/vm-v2-cve-datastore-33384 branch from 67e0011 to 828841c Compare March 17, 2026 10:38
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.

3 participants