refactor: make devctr build process multi-staged.#5779
Merged
JamesC1305 merged 9 commits intofirecracker-microvm:mainfrom Apr 8, 2026
Merged
refactor: make devctr build process multi-staged.#5779JamesC1305 merged 9 commits intofirecracker-microvm:mainfrom
JamesC1305 merged 9 commits intofirecracker-microvm:mainfrom
Conversation
8633fcd to
5bb3b57
Compare
5bb3b57 to
d802498
Compare
Update the rust toolchain to version 1.94.0. This will close dependabot PR firecracker-microvm#5803. Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
Update python dependencies to close dependabot PRs: - filelock firecracker-microvm#5626 - black firecracker-microvm#5756 - requests firecracker-microvm#5798 - pygments firecracker-microvm#5804 Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
d802498 to
ceb25ce
Compare
zulinx86
previously approved these changes
Mar 31, 2026
Contributor
zulinx86
left a comment
There was a problem hiding this comment.
LGTM. Let me know when you bumped the tag.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5779 +/- ##
=======================================
Coverage 83.08% 83.08%
=======================================
Files 275 275
Lines 29459 29459
=======================================
Hits 24476 24476
Misses 4983 4983
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Manciukic
reviewed
Apr 1, 2026
Contributor
Manciukic
left a comment
There was a problem hiding this comment.
there's 2 fewer dependencies in the final image. Are they used at runtime during the vhost-user tests?
Switch from a single stage build to a multi-staged build for the devctr.
Although we don't often rebuild this, this should reduce the time taken
when we do, due to unchanged layers now being cached.
In my testing, this cut the full build time from ~1300s to ~600s without
inflating the image size further. We also don't have to manually clean
up after earlier build stages, as they are not included in the final
image.
Stage dependency graph:
+--- qemu-builder -------+
| |
+--- libseccomp-builder -+
| |
base-image +--------------------+--- iperf3-builder -----+--- devctr
| | |
| +--- git-secrets-builder +
| |
+--- apt-base |
| |
| |
python-deps +--- crosvm-builder -----+
| | |
rust-toolchain ---+------------------------+
Parallel builders (from base-image):
qemu-builder, libseccomp-builder, iperf3-builder, git-secrets-builder
Sequential base chain:
base-image -> apt-base -> python-deps -> rust-toolchain
Rust fork (from rust-toolchain):
crosvm-builder (build deps thrown away, only binary copied)
devctr (cargo tools, kani, nightly, then COPY
from all builders)
Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
With the latest devctr dependency updates, running `tools/devtool fmt` results in some files being reformatted. These are resulting from new versions of `black` and `mdformat`. Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
As of rust toolchain version 1.94.0, CPUID-related functions from the standard library are no longer unsafe [1]. However, we cannot simply remove them as the nightly toolchain used by Kani has not been updated to a version with this change. Add TODO comments to remove unsafe blocks when Kani toolchain is updated. [1]: rust-lang/stdarch#1935 Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
Update the devctr to the latest tag v89 Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
The LTS ubuntu 24.04 version seems to have been updated since the last devctr build. Update the get_os_version() function accordingly. Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
8a598ee to
7b83d75
Compare
Manciukic
previously approved these changes
Apr 8, 2026
With Docker Engine v28 and before, overlay2 was the default storage engine used. When launching nested dockerd, an error would be thrown and dockerd would silently switch to use VFS as the storage engine. With Docker Engine v29 [1], the default storage engine is now overlayfs, which does not throw an error on boot, but causes downstream issues when trying to pull container images. This commit enforces the previous behaviour, ensuring that new nested Docker versions (which we do not pin) do not cause errors. [1]: https://docs.docker.com/engine/release-notes/29/#2900 Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
zulinx86
previously approved these changes
Apr 8, 2026
898ed24 to
ceba3ce
Compare
zulinx86
approved these changes
Apr 8, 2026
JackThomson2
approved these changes
Apr 8, 2026
Manciukic
approved these changes
Apr 8, 2026
This was referenced Apr 8, 2026
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.
Make the devctr build process multi-staged. This decouples the different build processes from each other, and in my measurement cut the build time from ~1300s to ~600s (21min to 8min).
In this PR we also update the poetry dependencies and rust toolchain to 1.94.0.
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md.PR Checklist
tools/devtool checkbuild --allto verify that the PR passesbuild checks on all supported architectures.
tools/devtool checkstyleto verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md.Runbook for Firecracker API changes.
integration tests.
TODO.rust-vmm.