From c912b30cda594b9dd81b7cd62fccf65d4b3262c5 Mon Sep 17 00:00:00 2001 From: AJ Alon Date: Thu, 10 Sep 2026 10:32:35 -0700 Subject: [PATCH 1/2] fix(ci): stabilize smoke dependency setup Retry Linux apt dependency setup before running smoke tests so transient GitHub-hosted mirror failures do not fail main CI runs. Install bash-completion@2 on macOS to match the CLI completion installer detection and user-facing guidance. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- .github/actions/install-deps/action.yaml | 16 +++++++++++++++- .github/workflows/pr-checks.yaml | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/actions/install-deps/action.yaml b/.github/actions/install-deps/action.yaml index c04a0b6f4..75fbb8b85 100644 --- a/.github/actions/install-deps/action.yaml +++ b/.github/actions/install-deps/action.yaml @@ -10,6 +10,8 @@ runs: if: runner.os == 'Linux' shell: bash run: | + set -euo pipefail + # Runner image pre-seeds MS apt sources (azure-cli/microsoft-prod); we don't use # them and they're a source of flaky/noisy apt-get update failures # (packages.microsoft.com sporadically serves a corrupted InRelease file). @@ -17,6 +19,18 @@ runs: # NOTE: if we ever actually need an MS package repo, re-add it explicitly for that job. # NOTE: or true is used to avoid failing the step if no files are found to delete. sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d/ 2>/dev/null | xargs -r sudo rm -f || true + + # GitHub-hosted apt mirrors occasionally return transient 100s; retry the + # dependency setup so smoke tests only fail on persistent package issues. + for attempt in 1 2 3; do + if sudo apt-get update && sudo apt-get install -y expect bash-completion; then + exit 0 + fi + + echo "apt dependency setup failed on attempt ${attempt}; retrying..." + sleep $((attempt * 5)) + done + sudo apt-get update sudo apt-get install -y expect bash-completion @@ -24,7 +38,7 @@ runs: if: runner.os == 'macOS' shell: bash run: | - brew install expect bash-completion + brew install expect bash-completion@2 - name: Install yq uses: dcarbone/install-yq-action@4075b4dca348d74bd83f2bf82d30f25d7c54539b # v1.3.1 diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index 9f437b85f..d7f420f51 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -319,6 +319,8 @@ jobs: - name: Install dependencies run: | + set -euo pipefail + # Runner image pre-seeds MS apt sources (azure-cli/microsoft-prod); we don't use # them and they're a source of flaky/noisy apt-get update failures # (packages.microsoft.com sporadically serves a corrupted InRelease file). @@ -326,6 +328,18 @@ jobs: # NOTE: if we ever actually need an MS package repo, re-add it explicitly for that job. # NOTE: or true is used to avoid failing the step if no files are found to delete. sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d/ 2>/dev/null | xargs -r sudo rm -f || true + + # GitHub-hosted apt mirrors occasionally return transient 100s; retry the + # dependency setup so completion tests only fail on persistent package issues. + for attempt in 1 2 3; do + if sudo apt-get update && sudo apt-get install -y expect bash-completion; then + exit 0 + fi + + echo "apt dependency setup failed on attempt ${attempt}; retrying..." + sleep $((attempt * 5)) + done + sudo apt-get update sudo apt-get install -y expect bash-completion From d37612d9b6ce2e5ccbcce4b5c26cb246fff3af46 Mon Sep 17 00:00:00 2001 From: AJ Alon Date: Thu, 10 Sep 2026 11:12:15 -0700 Subject: [PATCH 2/2] fix(ci): scope smoke dependency fix to macos completion Remove the generic Linux apt retry from the smoke dependency setup. The available CI metadata only showed apt exit 100, not a distinct root cause beyond the existing packages.microsoft.com cleanup. Keep the deterministic macOS fix: install bash-completion@2, matching the CLI completion installer detection and guidance. Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> --- .github/actions/install-deps/action.yaml | 14 -------------- .github/workflows/pr-checks.yaml | 14 -------------- 2 files changed, 28 deletions(-) diff --git a/.github/actions/install-deps/action.yaml b/.github/actions/install-deps/action.yaml index 75fbb8b85..fb60cecf8 100644 --- a/.github/actions/install-deps/action.yaml +++ b/.github/actions/install-deps/action.yaml @@ -10,8 +10,6 @@ runs: if: runner.os == 'Linux' shell: bash run: | - set -euo pipefail - # Runner image pre-seeds MS apt sources (azure-cli/microsoft-prod); we don't use # them and they're a source of flaky/noisy apt-get update failures # (packages.microsoft.com sporadically serves a corrupted InRelease file). @@ -19,18 +17,6 @@ runs: # NOTE: if we ever actually need an MS package repo, re-add it explicitly for that job. # NOTE: or true is used to avoid failing the step if no files are found to delete. sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d/ 2>/dev/null | xargs -r sudo rm -f || true - - # GitHub-hosted apt mirrors occasionally return transient 100s; retry the - # dependency setup so smoke tests only fail on persistent package issues. - for attempt in 1 2 3; do - if sudo apt-get update && sudo apt-get install -y expect bash-completion; then - exit 0 - fi - - echo "apt dependency setup failed on attempt ${attempt}; retrying..." - sleep $((attempt * 5)) - done - sudo apt-get update sudo apt-get install -y expect bash-completion diff --git a/.github/workflows/pr-checks.yaml b/.github/workflows/pr-checks.yaml index d7f420f51..9f437b85f 100644 --- a/.github/workflows/pr-checks.yaml +++ b/.github/workflows/pr-checks.yaml @@ -319,8 +319,6 @@ jobs: - name: Install dependencies run: | - set -euo pipefail - # Runner image pre-seeds MS apt sources (azure-cli/microsoft-prod); we don't use # them and they're a source of flaky/noisy apt-get update failures # (packages.microsoft.com sporadically serves a corrupted InRelease file). @@ -328,18 +326,6 @@ jobs: # NOTE: if we ever actually need an MS package repo, re-add it explicitly for that job. # NOTE: or true is used to avoid failing the step if no files are found to delete. sudo grep -rl 'packages.microsoft.com' /etc/apt/sources.list.d/ 2>/dev/null | xargs -r sudo rm -f || true - - # GitHub-hosted apt mirrors occasionally return transient 100s; retry the - # dependency setup so completion tests only fail on persistent package issues. - for attempt in 1 2 3; do - if sudo apt-get update && sudo apt-get install -y expect bash-completion; then - exit 0 - fi - - echo "apt dependency setup failed on attempt ${attempt}; retrying..." - sleep $((attempt * 5)) - done - sudo apt-get update sudo apt-get install -y expect bash-completion