Skip to content

Commit 660fdef

Browse files
ci: retry the code-server download in vscode e2e (#6230)
Signed-off-by: Nick Muoh <nickspirit3+github@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9d89350 commit 660fdef

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

‎.github/workflows/pr.yaml‎

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,26 @@ jobs:
536536
- name: Install code-server
537537
# Pinned so that a code-server release cannot change the editor UI the
538538
# tests drive without the change showing up here first.
539-
run: curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.137.0
539+
# The installer curls the .deb once. A reset (curl exit 56) fails the
540+
# job. A repeat resumes the partial file the installer leaves behind.
541+
run: |
542+
set -euo pipefail
543+
for attempt in 1 2 3 4 5; do
544+
if curl -fsSL https://code-server.dev/install.sh | sh -s -- --version 4.137.0; then
545+
exit 0
546+
fi
547+
echo "code-server install failed (attempt ${attempt}); retrying"
548+
sleep $((attempt * 5))
549+
done
550+
echo "code-server install failed after 5 attempts"
551+
exit 1
540552
- name: Install Playwright browsers
541553
working-directory: ./vscode/extension
542554
run: pnpm exec playwright install
543555
- name: Run e2e tests
544556
working-directory: ./vscode/extension
545-
timeout-minutes: 30
557+
# CI runs one worker. That needs a longer cap than the old 30 minutes.
558+
timeout-minutes: 60
546559
run: |
547560
source ../../.venv/bin/activate
548561
pnpm run test:e2e

‎vscode/extension/playwright.config.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ export default defineConfig({
88
timeout: 180_000,
99
// TODO: When stable, allow retries in CI
1010
retries: process.env.CI ? 2 : 0,
11-
workers: process.env.CI ? 2 : 4,
11+
// One worker on CI. Two workers each start code-server, Chromium, and a
12+
// SQLMesh virtualenv, which starved a GitHub-hosted runner until it lost
13+
// communication with the service.
14+
workers: process.env.CI ? 1 : 4,
1215
reporter: [['html', { outputFolder: 'playwright-report' }], ['list']],
1316
projects: [
1417
{

‎vscode/extension/tests/lineage.spec.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ test('Lineage panel renders correctly - multiworkspace setup', async ({
195195
)
196196

197197
await openServerPage(page, workspaceFilePath, sharedCodeServer)
198+
// The first load already has both folders. Reloading ?workspace= keeps the
199+
// workspace title and clears the folders ("No Folder Opened"), so the LSP
200+
// never starts.
201+
await page.getByText('sushi1', { exact: true }).waitFor()
198202
await expect(
199203
page.getByRole('treeitem', { name: 'sushi1', exact: true }),
200204
).toBeVisible()
@@ -254,6 +258,7 @@ test('Lineage panel renders correctly - multiworkspace setup reversed', async ({
254258
)
255259

256260
await openServerPage(page, workspaceFilePath, sharedCodeServer)
261+
await page.getByText('sushi2', { exact: true }).waitFor()
257262
await expect(
258263
page.getByRole('treeitem', { name: 'sushi1', exact: true }),
259264
).toBeVisible()

0 commit comments

Comments
 (0)