Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/scripts/prepare-ubuntu-apt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail

# GitHub's mirror+file sources resolve through apt-mirrors.txt, not just sources.list.
for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
if [ -f "$source" ]; then
sudo sed -i 's|https*://azure\.archive\.ubuntu\.com/ubuntu|https://archive.ubuntu.com/ubuntu|g' "$source"
fi
done
sudo tee /etc/apt/apt.conf.d/99-orca-ci >/dev/null <<'APTCONF'
Acquire::http::Timeout "15";
Acquire::https::Timeout "15";
Acquire::Retries "1";
APTCONF
12 changes: 1 addition & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,7 @@ jobs:
exit 0
fi
read -r -a packages <<< "$ORCA_E2E_APT_PACKAGES"
# Why apt-mirrors.txt: runner images resolve mirror+file: sources through it, so editing the lists alone leaves Azure in use.
for source in /etc/apt/apt-mirrors.txt /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do
if [ -f "$source" ]; then
sudo sed -i 's|https*://azure\.archive\.ubuntu\.com/ubuntu|https://archive.ubuntu.com/ubuntu|g' "$source"
fi
done
sudo tee /etc/apt/apt.conf.d/99-orca-e2e >/dev/null <<'APTCONF'
Acquire::http::Timeout "15";
Acquire::https::Timeout "15";
Acquire::Retries "1";
APTCONF
bash .github/scripts/prepare-ubuntu-apt.sh
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
timeout 120 sudo apt-get update
timeout 300 sudo apt-get install -y "${packages[@]}" || timeout 300 sudo apt-get install -y --fix-missing "${packages[@]}"

Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,9 @@ jobs:
- name: Install WebKit for the drawer check
id: webkit
background: true
run: pnpm exec playwright-core install --with-deps webkit
run: |
bash .github/scripts/prepare-ubuntu-apt.sh
pnpm exec playwright-core install --with-deps webkit

# The entry lives in mobile/ so one React resolves; without this every RN import is nothing.
- uses: ./.github/actions/install-mobile-dependencies
Expand Down
1 change: 1 addition & 0 deletions config/scripts/pr-code-change-scope.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ const DEPENDENCY_ISOLATION_PREFIXES = [
]

const MOBILE_WEB_APP_PREFIXES = [
'.github/scripts/prepare-ubuntu-apt.sh',
'config/scripts/build-mobile-web-app',
'config/scripts/run-mobile-web-app-checks',
'src/packages/process-host/',
Expand Down
1 change: 1 addition & 0 deletions config/scripts/pr-e2e-source-routing.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ export function selectPrE2eSpecs(
(file.startsWith('tests/e2e/helpers/') &&
[...specs].some((spec) => spec.startsWith(MANAGED_SSH_E2E_SPEC_PREFIX))) ||
file === '.github/workflows/e2e.yml' ||
file === '.github/scripts/prepare-ubuntu-apt.sh' ||
file === 'config/scripts/ci-e2e-job-selection.mjs'
)
) {
Expand Down
1 change: 1 addition & 0 deletions config/scripts/pr-layout-oracle-route.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const LAYOUT_ORACLE_PREFIXES = [
'.github/scripts/e2e-with-window-manager.sh',
// The job itself: the called workflow, its window-spec lane picker, and this route.
'.github/workflows/e2e.yml',
'.github/scripts/prepare-ubuntu-apt.sh',
'config/scripts/ci-e2e-job-selection.mjs',
'config/scripts/pr-layout-oracle-route.mjs'
]
Expand Down
Loading