Skip to content

Conversation

@bmastbergen
Copy link
Collaborator

@bmastbergen bmastbergen commented Jan 30, 2026

Adds a new --content_release flag to the kt vm command that automates the entire LTS content release process. The workflow includes:

  • Running mkdistgitdiff to generate dist-git updates from source changes
  • Fetching sources via getsrc.sh
  • Building kernel RPMs using mock with per-kernel configs
  • Installing the built kernel in the VM
  • Rebooting and running kselftests

Changes:

  • Add content_release() method to VmInstance that orchestrates the workflow
  • Add mock_config field to kernels.yaml for each kernel variant
  • Add user/email/depot_user/depot_token config fields needed for builds
  • Add mock and python3-GitPython dependencies to kernel_install_dep.sh
  • Update KernelInfo to include mock_config

This is seriously quick and dirty. I don't know that adding the user info, depot info, and mock info to config and kernels.yaml is the right solution, it just got things working quick for this experiment.

And since its not in the diff, this requires the mock-configs and kernel-tools repos checked out in the kt workspace.

This works for lts-9.2. That is all I tested. More testing will be needed. This is really just an RFC at the moment.

Copilot AI review requested due to automatic review settings January 30, 2026 14:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the kt vm command with a --content_release workflow that automates building and installing LTS kernels in a VM from dist-git, then running kselftests. It introduces configuration fields and YAML metadata needed to drive the per-kernel mock builds and depot authentication.

Changes:

  • Extend KernelInfo / kernels.yaml to track a per-kernel mock_config used for mock builds.
  • Extend Config with user, email, depot_user, and depot_token and adjust from_str_dict to only treat specific keys as paths.
  • Add VmInstance.content_release, a --content_release CLI flag, and additional VM dependencies (mock, python3-GitPython) plus a few supporting wiring changes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
kt/ktlib/kernels.py Adds a required mock_config field to KernelInfo to match new kernels.yaml entries and support selecting the proper mock config for each kernel.
kt/ktlib/config.py Adds user/depot-related config fields and refines from_str_dict to convert only specific keys to Path, changing how JSON configs must be structured.
kt/data/kernels.yaml Annotates each kernel entry with its corresponding mock_config filename to be used by the content release workflow.
kt/commands/vm/impl.py Implements the VmInstance.content_release orchestration, wires it into main, and consumes configuration/kernels metadata to run mkdistgitdiff, mock builds, install RPMs, and run kselftests.
kt/commands/vm/command.py Exposes the new --content_release flag on the kt vm CLI and forwards it to the implementation.
kernel_install_dep.sh Ensures mock and python3-GitPython are installed for supported Rocky versions and adds the invoking user to the mock group to allow mock builds within the VM.
Comments suppressed due to low confidence (1)

kt/commands/vm/impl.py:375

  • In the content_release path we log “Waiting for the deps to be installed” but the actual time.sleep(Constants.VM_DEPS_INSTALL_WAIT_SECONDS) call is commented out, unlike the test path above. This means that on a freshly created VM the content release workflow may start before kernel_install_dep.sh has finished installing mock, python3-GitPython, and other dependencies, leading to sporadic failures; either restore the sleep or otherwise ensure dependency installation has completed before invoking content_release.
    vm = Vm.load(config=config, kernel_workspace=kernel_workspace)
    if destroy:
        vm.destroy()
        return


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…rkflow

Adds a new --content_release flag to the kt vm command that automates the
entire LTS content release process. The workflow includes:

- Running mkdistgitdiff to generate dist-git updates from source changes
- Fetching sources via getsrc.sh
- Building kernel RPMs using mock with per-kernel configs
- Installing the built kernel in the VM
- Rebooting and running kselftests

Changes:
- Add content_release() method to VmInstance that orchestrates the workflow
- Add mock_config field to kernels.yaml for each kernel variant
- Add user/email/depot_user/depot_token config fields needed for builds
- Add mock and python3-GitPython dependencies to kernel_install_dep.sh
- Update KernelInfo to include mock_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants