Repository navigation
fix(vm): give jobs the environment of the image - #9
Merged
Merged
Conversation
In VM mode, jobs did not get the ENV of the image config. Thus a VM had no RUNNER_TOOL_CACHE or ImageOS, and actions/setup-node, setup-python, and setup-go downloaded the tools that the image has in /opt/hostedtoolcache. On a nested VM, setup-node took 2 to 3 minutes for each job. The root disk now holds the image environment in /etc/runplane/environ. runplane-init sets it after it mounts the root, as Docker does in container mode.
ephraimduncan
added a commit
that referenced
this pull request
Nov 6, 2026
Merge 79d3da7, 1b78e39, and d27d5da of main. The features keep the behavior of main. Each feature uses the packages of the refactor. CI on the runplane runners (#7): the jobs use the runplane label, and the image builds use QEMU. images.yml keeps the matrices of images.go and its comment about the build context. Image environment in VM mode (#9): internal/sandbox/guest owns ImageEnvFile and its form. EncodeImageEnv writes the file in the root disk, and runplane-init reads it with DecodeImageEnv. Thus the NUL format has one place. Pull requests that move jobs to runplane (#8): - ghrest.Call has a JSON Body. ghrest.PullPermissions is part of AppPermissions, thus the manifest, the connect form, and the permission check use one list. - github does not import huma. OpenPullRequest returns store.ErrNotFound, ghrest.ErrNoPullPermissions, or field.Problems, and the API changes them into 404, 403, and 422. Setup and the permission check read the installation through one function. - The audit action github.pull_request.create is in the audit enum. Its detail has the repository, and the web has a text for it. - The API gives permissions_url on the app. The web does not make the URL. The pull request description links to pages.Jobs. - The label of the request has no pattern. The check against the enabled pools gives the 422 at body.label. - The web finds the repositories with publicReposRun, the rule of the job access switch. Before, the web had a second rule that ignored dev mode and the modes of the servers. - The route files only give params. The settings page and the first job step have the form. FormAlert moved to components/app, because the github pages must not import the setup pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In VM mode, jobs did not get the environment of the image config. Docker gives the
ENVof an image to the first process of a container, but a Firecracker VM boots from an ext4 copy of the image files only. Thus a VM had noRUNNER_TOOL_CACHEorImageOS, andactions/setup-node,setup-python, andsetup-godid not find the tool cache in/opt/hostedtoolcache. They downloaded each tool again and copied it into_work/_tool. On the telemetry.dev jobs,setup-nodeloggedAttempting to download 24...and took 2 to 3 minutes.The root disk now holds the image environment in
/etc/runplane/environ, with a NUL byte after each entry. runplane-init sets these variables after it mounts the root, before it starts dockerd and the runner. Thus a job in a VM gets the same environment as a job in container mode.The name of a root disk contains the hash of runplane-init. Thus, after the update, each VM server makes its root disks again one time.