Skip to content

ROX-33338: VM v2 generate schemas#19238

Draft
dashrews78 wants to merge 3 commits intodashrews/vm-v2-proto-32746from
dashrews/vm-v2-schema-33338
Draft

ROX-33338: VM v2 generate schemas#19238
dashrews78 wants to merge 3 commits intodashrews/vm-v2-proto-32746from
dashrews/vm-v2-schema-33338

Conversation

@dashrews78
Copy link
Contributor

Add VM v2 search categories, gen.go files, and generated schemas

Add four new search categories (VIRTUAL_MACHINES_V2, VIRTUAL_MACHINE_SCANS_V2,
VIRTUAL_MACHINE_COMPONENTS_V2, VIRTUAL_MACHINE_VULNERABILITIES_V2) to
search_service.proto and create gen.go files with --schema-only for
VirtualMachineV2, VirtualMachineScanV2, VirtualMachineComponentV2, and
VirtualMachineCVEV2. All types reuse the existing VirtualMachine SAC resource.
FK references: Scan->VM, Component->Scan, CVE->VM+Component.

Generated with the help of AI.

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

Remove --table flag from VM v2 gen.go files to use auto-generated table names

The table names were previously hardcoded with --table flags that used
plural forms (e.g., virtual_machines_v2), causing a mismatch with what
the NamingStrategy derives from the storage type names. Removing --table
lets the generator auto-derive table names consistently, which fixes
cross-table reference resolution in the generated schema files.

Partially generated by AI

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

regenerate

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!

dashrews78 and others added 3 commits February 27, 2026 14:40
Add four new search categories (VIRTUAL_MACHINES_V2, VIRTUAL_MACHINE_SCANS_V2,
VIRTUAL_MACHINE_COMPONENTS_V2, VIRTUAL_MACHINE_VULNERABILITIES_V2) to
search_service.proto and create gen.go files with --schema-only for
VirtualMachineV2, VirtualMachineScanV2, VirtualMachineComponentV2, and
VirtualMachineCVEV2. All types reuse the existing VirtualMachine SAC resource.
FK references: Scan->VM, Component->Scan, CVE->VM+Component.

Generated with the help of AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…le names

The table names were previously hardcoded with --table flags that used
plural forms (e.g., virtual_machines_v2), causing a mismatch with what
the NamingStrategy derives from the storage type names. Removing --table
lets the generator auto-derive table names consistently, which fixes
cross-table reference resolution in the generated schema files.

Partially generated by AI

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

openshift-ci bot commented Feb 27, 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

@dashrews78
Copy link
Contributor Author

@dashrews78 dashrews78 changed the title ROX-33338: VM v2 search categories, gen.go files, and generated schemas ROX-33338: VM v2 generate schemas Feb 27, 2026
@rhacs-bot
Copy link
Contributor

Images are ready for the commit at f5992ce.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-205-gf5992ce703.

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