Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: use pre-built binary instead ofgo run in e2e tests#16236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 5 commits intomainfromlilac/e2e-skip-app
Jan 23, 2025

Conversation

aslilac
Copy link
Member

@aslilacaslilac commentedJan 22, 2025
edited
Loading

Closescoder/internal#204
Closescoder/internal#279

Usinggo run inside of a test is fragile, because it means we have to wait forgo to compile the binary while also constrained on resources by the fact that Playwright and coderd are already running. We should instead compile a coder binary for the current platform before the tests and use it directly.

@aslilacaslilac changed the titlefix: skip "app" e2e testfix: use pre-built binary instead ofgo run in e2e testsJan 23, 2025
@spikecurtis
Copy link
Contributor

I think maybe the PR description is out of date

Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Changes look good, but yeah, agree with Spike – definitely need a new description, especially if we're going to be using it for the squashed message

import { execSync } from "node:child_process";
import * as path from "node:path";

export default function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Is there a reason why this is a default function instead of a named one? Not sure if our setup is looking for default exports specifically

Copy link
MemberAuthor

@aslilacaslilacJan 23, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

yeah, if you look in playwright.config.ts we specify aglobalSetup option with a path to this file as the value. playwright will then load this file and execute the default export exactly once per test run.

it's not safe to do any of this in the playwright.config.ts file directly because that gets executed once per worker (ie. potentially dozens of times per run)

@aslilac
Copy link
MemberAuthor

Either there's some crazy contention bug, the agent randomly takes 45 seconds to compile and run,

I love that you can see exactly where I realized what the problem was 😂

But yeah, I'll update the description.

@aslilacaslilac merged commit5f4ff58 intomainJan 23, 2025
38 checks passed
@aslilacaslilac deleted the lilac/e2e-skip-app branchJanuary 23, 2025 16:45
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 23, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@ParkreinerParkreinerParkreiner approved these changes

Assignees

@aslilacaslilac

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake:app.spec.ts E2E test flake: e2e-premium test app
3 participants
@aslilac@spikecurtis@Parkreiner

[8]ページ先頭

©2009-2025 Movatter.jp