Skip to content

refactor(images): remove VM base image - #18776

Open
binujp wants to merge 2 commits into
4.0from
bphilip/rename-vm-base-to-1p-gen2
Open

refactor(images): remove VM base image#18776
binujp wants to merge 2 commits into
4.0from
bphilip/rename-vm-base-to-1p-gen2

Conversation

@binujp

@binujp binujp commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove the redundant standalone vm-base image
  • retain the shared VmBaseCore profile for 1P images
  • move UEFI static checks to the 1p-vm-base-gen2 replacement

Rationale

vm-base predates the current 1P/3P Gen1/Gen2 hierarchy and is superseded by 1p-vm-base-gen2, which otherwise has the same package set plus rsyslog, libestr, and libfastjson.

Copilot AI balanced review requested due to automatic review settings September 9, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new Python tests violate enforced Ruff S101 rules, and the README still documents the removed test directory.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Removes the redundant vm-base image while retaining its shared package profile and replacing it with 1p-vm-base-gen2.

Changes:

  • Moves Gen2 UEFI configuration into the 1P hierarchy.
  • Registers the replacement image and transfers its test suites.
  • Adds replacement-specific kernel and partition checks.
File summaries
File Description
base/images/tests/README.md Updates VM test examples.
base/images/tests/cases/static/1p-vm-base-gen2/test_partitions.py Adds partition checks.
base/images/tests/cases/static/1p-vm-base-gen2/test_kernel.py Adds kernel checks.
base/images/teams/cloud/vm-base.xml Retains only VmBaseCore.
base/images/teams/cloud/onep.xml Defines the Gen2 UEFI profile.
base/images/images.toml Replaces the image registration.
Review details
  • Files reviewed: 4/6 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread base/images/tests/README.md
Copilot AI review requested due to automatic review settings September 9, 2026 18:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The replacement profile, configuration, tests, and documentation are complete and internally consistent.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@binujp
binujp force-pushed the bphilip/rename-vm-base-to-1p-gen2 branch from 80baf57 to 9d54a10 Compare September 10, 2026 03:48
@binujp
binujp marked this pull request as ready for review September 10, 2026 03:55
@binujp
binujp requested a review from a team as a code owner September 10, 2026 03:55
Copilot AI review requested due to automatic review settings September 10, 2026 03:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The replacement preserves the shared profile hierarchy and correctly redirects image registration and static validation.

Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

binujp and others added 2 commits September 9, 2026 22:28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 7bd3adef-a234-420d-b07f-e7301af0b050
As part of consolidating images to 1P and 3P variants for both Gen1 and
Gen2 image types, drop the standalone vm-base image.

vm-base was effectively the Gen2 1P x86_64 image and was the first
image built in this repo, predating the current 1P/3P hierarchy. Now
that the hierarchical image definitions and the rest of the 1P/3P
Gen1/Gen2 images are in place, vm-base is redundant: 1p-vm-base-gen2 is
a strict superset of vm-base, carrying 3 extra packages (rsyslog,
libestr, libfastjson) on top of an otherwise identical package set.

Retain the shared VmBaseCore profile for 1P images and move the UEFI
static checks to the 1P Gen2 replacement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3188afea-d864-49af-acba-88a493e5b703
@binujp
binujp force-pushed the bphilip/rename-vm-base-to-1p-gen2 branch from 9d54a10 to 90f164f Compare September 10, 2026 05:31

@tobiasb-ms Tobias Brick (tobiasb-ms) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image changes themselves look good but I'm confused about the changes away from assert in the tests.

if not modules_dir.exists():
modules_dir = rootfs / "lib" / "modules"
assert modules_dir.exists(), "No kernel modules directory found"
if not modules_dir.exists():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue(blocking): Why are you changing these from assert to if with fail? Are you changing behavior in any way? What's the purpose of the changes?

@@ -13,21 +13,26 @@ def test_kernel_modules_present(rootfs: Path) -> None:
modules_dir = rootfs / "usr" / "lib" / "modules"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question(non-blocking): should these tests be marked as applicable to all VM images? they were presumably associated with vm-base when that was our only VM image.

modules_dir = rootfs / "lib" / "modules"
assert modules_dir.exists(), "No kernel modules directory found"
if not modules_dir.exists():
pytest.fail("No kernel modules directory found")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question(blocking): Why were these assertions changed to pytest.fail() calls? Ditto for below.

<requires profile="LegacyBoot" />
<requires profile="OnePBase" />
</profile>
<profile name="1p-vm-base-gen2" description="1P VM Base Gen2 Image (UEFI)" import="false">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question(blocking): Why are there XML changes? Did we not already have the right composition? I didn't see the explanation in the PR summary.

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.

4 participants