From 5ae37ecfc344aebe53e210d0d9ec93240baf8b2d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:37:37 +0000 Subject: [PATCH 1/5] Initial plan From 988bf810876f80f3e03e9c36fda5d4626f69a5cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:38:52 +0000 Subject: [PATCH 2/5] Add pre-install step for apt dependencies in setup action Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/c843fe62-a416-4d7d-9da8-03f3ba99af40 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/actions/setup/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shared-overwrite/.github/actions/setup/action.yml b/shared-overwrite/.github/actions/setup/action.yml index 52bbd26e..bfa96bb8 100644 --- a/shared-overwrite/.github/actions/setup/action.yml +++ b/shared-overwrite/.github/actions/setup/action.yml @@ -54,6 +54,12 @@ runs: # echo "MT_GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV echo "MT_GIT_BRANCH=$MT_GIT_BRANCH" >> $GITHUB_ENV + - name: MT install apt dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y libxml2-utils jq inkscape imagemagick + - name: MT code sync shell: bash if: ${{ inputs.code-sync == 'true' }} From a85a1862ee805a2f4fd9c532a766441fb651aeef Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 12:17:50 +0000 Subject: [PATCH 3/5] Add 10-min timeout and auto-retry to apt dependencies install step Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/e5047fd9-abc8-4afe-beb6-4cff125ba8c5 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/actions/setup/action.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/shared-overwrite/.github/actions/setup/action.yml b/shared-overwrite/.github/actions/setup/action.yml index bfa96bb8..3902717c 100644 --- a/shared-overwrite/.github/actions/setup/action.yml +++ b/shared-overwrite/.github/actions/setup/action.yml @@ -57,8 +57,19 @@ runs: - name: MT install apt dependencies shell: bash run: | - sudo apt-get update - sudo apt-get install -y libxml2-utils jq inkscape imagemagick + max_attempts=2 + for attempt in $(seq 1 ${max_attempts}); do + echo "[MT] > Installing apt dependencies (attempt ${attempt}/${max_attempts})..." + if timeout 600 sudo apt-get update && timeout 600 sudo apt-get install -y libxml2-utils jq inkscape imagemagick; then + echo "[MT] > apt dependencies installed successfully." + break + elif [[ ${attempt} -lt ${max_attempts} ]]; then + echo "[MT] > apt dependencies installation failed or timed out, retrying..." + else + echo "[MT] > apt dependencies installation failed after ${attempt} attempts." + exit 1 + fi + done - name: MT code sync shell: bash From 825fd3d9d7835e33e855b3417d1561ed5cd61473 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 10 Apr 2026 14:21:38 +0000 Subject: [PATCH 4/5] Use --no-install-recommends, reduce timeout to 300s, sleep 5 before retry Agent-Logs-Url: https://github.com/mtransitapps/commons/sessions/ccc2ffda-e29c-47b0-8d76-b136e0fb4bd9 Co-authored-by: mmathieum <177998+mmathieum@users.noreply.github.com> --- shared-overwrite/.github/actions/setup/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared-overwrite/.github/actions/setup/action.yml b/shared-overwrite/.github/actions/setup/action.yml index 3902717c..5d73c1ef 100644 --- a/shared-overwrite/.github/actions/setup/action.yml +++ b/shared-overwrite/.github/actions/setup/action.yml @@ -60,11 +60,12 @@ runs: max_attempts=2 for attempt in $(seq 1 ${max_attempts}); do echo "[MT] > Installing apt dependencies (attempt ${attempt}/${max_attempts})..." - if timeout 600 sudo apt-get update && timeout 600 sudo apt-get install -y libxml2-utils jq inkscape imagemagick; then + if timeout 300 sudo apt-get update && timeout 300 sudo apt-get install -y --no-install-recommends libxml2-utils jq inkscape imagemagick; then echo "[MT] > apt dependencies installed successfully." break elif [[ ${attempt} -lt ${max_attempts} ]]; then - echo "[MT] > apt dependencies installation failed or timed out, retrying..." + echo "[MT] > apt dependencies installation failed or timed out, retrying in 5 seconds..." + sleep 5 else echo "[MT] > apt dependencies installation failed after ${attempt} attempts." exit 1 From f958d4effe18cac9d85f009c33458262ba620566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20M=C3=A9a?= Date: Fri, 10 Apr 2026 11:12:53 -0400 Subject: [PATCH 5/5] Update action.yml --- shared-overwrite/.github/actions/setup/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared-overwrite/.github/actions/setup/action.yml b/shared-overwrite/.github/actions/setup/action.yml index 5d73c1ef..9856ecf1 100644 --- a/shared-overwrite/.github/actions/setup/action.yml +++ b/shared-overwrite/.github/actions/setup/action.yml @@ -60,7 +60,8 @@ runs: max_attempts=2 for attempt in $(seq 1 ${max_attempts}); do echo "[MT] > Installing apt dependencies (attempt ${attempt}/${max_attempts})..." - if timeout 300 sudo apt-get update && timeout 300 sudo apt-get install -y --no-install-recommends libxml2-utils jq inkscape imagemagick; then + # can not use '--no-install-recommends' because some of those recommended dependencies are required + if timeout 300 sudo apt-get update && timeout 300 sudo apt-get install -y libxml2-utils jq inkscape imagemagick; then echo "[MT] > apt dependencies installed successfully." break elif [[ ${attempt} -lt ${max_attempts} ]]; then