Skip to content

Build coderd + run E2E tests on Windows #384

Closed
@bryphe-coder

Description

@bryphe-coder

#288 enables running E2E tests via playwright on both MacOS and Ubuntu.

However, unfortunately, the E2E run does not include in Windows.

The main blocker is that we currently run our E2E tests against a local coderd binary, which means that binary has to be built.

Our make build step is not cross-platform compatible:

  1. The yarn_install.sh script does not work properly on Windows, when called from a Makefile. It results in this error:
./scripts/yarn_install.sh
Windows Subsystem for Linux has no installed distributions.

Distributions can be installed by visiting the Microsoft Store:

https://aka.ms/wslstore

mingw32-make: *** [Makefile:[10](https://github.com/coder/coder/runs/5368058980?check_suite_focus=true#step:8:10)2: site/out] Error 1

https://github.com/coder/coder/runs/5368058980?check_suite_focus=true#step:8:7

  1. Beyond that, the yarn install and other build commands for front-end, even when called directly from the Makefile end up having errors - likely due to being run in a WSL context instead of 'real' Windows:
cd site && yarn install
yarn install v1.22.1[7](https://github.com/coder/coder/runs/5368562727?check_suite_focus=true#step:8:7)
[1/4] Resolving packages...
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/@material-ui/icons/-/icons-4.5.1.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "D:\\a\\coder\\coder\\site\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Entering debug mode. Use h or ? for help.

https://github.com/coder/coder/runs/5368562727?check_suite_focus=true#step:8:23

Possible discussion / solution here: https://github.community/t/yarn-esockettimedout-on-windows/118776/4

With those two issues unblocked - we should be able to build coderd and run the E2E tests.

There are a few other possible solutions:

  • We could cross-compile all supported architectures from a Ubuntu machine -> store them as GH artifacts -> consume the built binary on Windows. In this case, Windows wouldn't actually build the binary, but it would consume it.
  • We could supply a happy path for building on Windows (ie, a build_win.bat).

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiArea: HTTP API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions