Skip to content

ROX-33383: Add VM v2 component DataStore#19433

Open
dashrews78 wants to merge 1 commit intomasterfrom
dashrews/vm-v2-component-datastore-33383
Open

ROX-33383: Add VM v2 component DataStore#19433
dashrews78 wants to merge 1 commit intomasterfrom
dashrews/vm-v2-component-datastore-33383

Conversation

@dashrews78
Copy link
Contributor

@dashrews78 dashrews78 commented Mar 16, 2026

Description

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

Integration tests cover all DataStore methods (Search, SearchRawVMComponents,
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.

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

Integration tests cover all DataStore methods (Search, SearchRawVMComponents,
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>
@dashrews78
Copy link
Contributor Author

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

Images are ready for the commit at 655e01f.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-328-g655e01f631.

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 71.42857% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.73%. Comparing base (3077dc9) to head (655e01f).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
...almachine/component/v2/datastore/datastore_impl.go 81.25% 4 Missing and 2 partials ⚠️
...virtualmachine/component/v2/datastore/singleton.go 44.44% 5 Missing ⚠️
...virtualmachine/component/v2/datastore/datastore.go 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19433      +/-   ##
==========================================
- Coverage   49.73%   49.73%   -0.01%     
==========================================
  Files        2703     2706       +3     
  Lines      204040   204089      +49     
==========================================
+ Hits       101489   101511      +22     
- Misses      94977    94999      +22     
- Partials     7574     7579       +5     
Flag Coverage Δ
go-unit-tests 49.73% <71.42%> (-0.01%) ⬇️

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:45
@dashrews78 dashrews78 requested a review from ajheflin March 16, 2026 14:28
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