Repository navigation
Speed up the cryptpilot-fde image build - #174
Merged
Merged
Conversation
The fde image build spent most of its time fetching repository metadata and RPMs it already had: - The build step ran yum-builddep after the dependency install had already satisfied the spec's BuildRequires. It downloaded the full metadata and resolved to "Nothing to do". Fold it into the dependency install so a build performs a single yum transaction. - Every stage rewrote the base image's in-cloud mirror to the public one. Probe the in-cloud mirror first and fall back to the public one only when it is unreachable. The published image still ships public URLs. - The release stage installed the freshly built RPM and its ~670 MB dependency tree in one layer, so every source change downloaded all of it again. Split the dependency tree into a layer keyed on the base image and install the local RPM with every repository disabled. Verified: - yum-builddep resolves the spec in the merged transaction. - The release dependency list resolves to the same 318 packages as before. - The offline local-RPM install handles the host package's rich and weak dependencies. Assisted-by: Claude Code:deepseek-v4.1-flash-1017 Signed-off-by: Kun Lai <laikun@linux.alibaba.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #174 +/- ##
=======================================
Coverage 37.23% 37.23%
=======================================
Files 93 93
Lines 8286 8286
Branches 8286 8286
=======================================
Hits 3085 3085
Misses 4900 4900
Partials 301 301 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
The fde image build was dominated by yum downloads that repeated work the build
had already done. Three changes:
yum-builddepinto the dependency-install step. The lateryum-builddepin the build step ran after the install had already satisfiedevery BuildRequires, so it downloaded the full repository metadata and
resolved to "Nothing to do". This removes one metadata download per build.
mirror when it is reachable, fall back to the public mirror otherwise. The
published image is rewritten to public URLs at the end.
The ~670 MB dependency tree now sits in a layer keyed on the base image, and
the local RPM is installed with every repository disabled, resolving
against the rpmdb alone. A cold build pays the same as before; a rebuild
after a source change downloads nothing.
Cold-build behavior is unchanged; the gain is on rebuilds, which is where the
time was going.
Verification:
previous install.
rich and weak dependencies.