Refresh apt package index before installing additional_packages - #185
Merged
Merged
Conversation
The runner image's baked-in apt package lists can lag behind the live Ubuntu archive. When a package gets a security update, the old .deb is removed from the mirror pool -- only the current version stays available. Installing straight from the stale cached index (without an apt-get update first) then 404s on the now-evicted old version, even though a perfectly good current build exists. Observed on puppetlabs-tomcat's Spec job: apt-get install -y libcurl4-openssl-dev failed fetching libcurl4-openssl-dev_8.5.0-2ubuntu10.11_amd64.deb (404), while libcurl4-openssl-dev_8.5.0-2ubuntu10.12_amd64.deb was live on the mirror at the same time. This affects any module using the additional_packages input, not just tomcat. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
Author
shubhamshinde360
approved these changes
Aug 21, 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.
Summary
module_ci.yml's "Install additional packages" step runssudo apt-get install -y ${{ inputs.additional_packages }}without anapt-get updatefirst..debis removed from the mirror pool — only the current version stays available.Observed failure
On
puppetlabs-tomcatPR #587's Spec job,apt-get install -y libcurl4-openssl-devfailed:At the same time,
libcurl4-openssl-dev_8.5.0-2ubuntu10.12_amd64.debwas live onazure.archive.ubuntu.com. The.11build had been superseded and removed from the pool; the runner's cached index just hadn't caught up.This affects any module using the
additional_packagesinput (confirmed bothpuppetlabs-tomcatandpuppetlabs-serviceuse it), and will recur any time a package referenced there gets a point-release update between runner-image builds.Fix
Run
sudo apt-get updateimmediately before the install, in both places this step appears (setup_matrixandspecjobs).Test plan
puppetlabs-tomcatPR (#587) and confirm theInstall additional packagesstep succeeds🤖 Generated with Claude Code