CI: Pre-install apt dependencies in setup action to prevent hangs#655
Merged
Conversation
Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/c843fe62-a416-4d7d-9da8-03f3ba99af40 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
Copilot
Bot
changed the title
[WIP] Fix CI setup action hanging during apt-get install
CI: Pre-install apt dependencies in setup action to prevent hangs
Apr 9, 2026
mmathieum
reviewed
Apr 10, 2026
Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/e5047fd9-abc8-4afe-beb6-4cff125ba8c5 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
mmathieum
reviewed
Apr 10, 2026
…etry Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/ccc2ffda-e29c-47b0-8d76-b136e0fb4bd9 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com>
mmathieum
approved these changes
Apr 10, 2026
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces a retry mechanism for installing apt dependencies within the setup action. The review feedback suggests enhancing the installation command with non-interactive environment variables and Dpkg options to prevent the CI process from stalling on configuration prompts.
Member
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
MT code syncstep could hang or run very slowly becauserequireCommand()incommons.shlazily invokesapt-geton demand mid-step. Pre-installing all known dependencies upfront eliminates these blocking calls.Changes
shared-overwrite/.github/actions/setup/action.yml: Added a newMT install apt dependenciesstep immediately beforeMT code syncthat eagerly installs all required packages, with a 5-minute timeout per command,--no-install-recommends, a 5-second pause, and automatic retry on failure or timeout:The step runs unconditionally — these packages are needed by all repos regardless of whether
code-syncis enabled, so subsequentrequireCommand()calls will find them already present and skip theapt-getinvocation entirely. Eachapt-getcommand is capped at 5 minutes (timeout 300),--no-install-recommendskeeps the install lean, and the whole install waits 5 seconds then retries once automatically before failing the step.