Repository navigation
CI: stop apt before saving the package cache after a timeout - #10
Merged
Merged
Conversation
When Install KiCad 10 times out, the runner kills the step but apt's download processes keep running. Saving the cache then failed on DroidCANBridge main (run 44402841035): "tar: .../archives/partial/mesa-libgallium_...deb: file changed as we read it", and nothing was kept. Stop apt-get and its download methods before saving; half-downloaded files stay in partial/ for apt to resume. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Follow-up to #9. The first run on
mainafter #9 landed (44402841035) started cold and timed out, as expected on a slow mirror. Then the save it depends on failed:When a step times out, the runner kills it, but apt's download processes keep running and writing into the cache. The save on #9's timed-out run only worked by luck.
Change
Before saving, the step (renamed Prepare the package cache for saving) now stops
apt-getand its download methods (/usr/lib/apt/methods/*). It sends SIGTERM, waits up to 10 s, then SIGKILL. The patterns are anchored, so the step can't match its ownsudo. Half-downloaded files stay inpartial/, and apt resumes them on the next run.The same commit is on PunderWorks/DroidPowerSense#19 and PunderWorks/VocalizerCAN#7.
Testing
On this PR, the cache is restored from
main.mainhas no usable cache yet because its first save failed, so this run starts cold too. If it times out, the save should now succeed, and that's the fix being tested.🤖 Generated with Claude Code