-
Notifications
You must be signed in to change notification settings - Fork 48
feat: run unit tests on Windows #842
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4452134 to
29d01f8
Compare
I'd like to start running taskgraph tests on Windows and macOS (taskcluster/taskgraph#842). This ought to add a usable Windows worker pool. Unfortunately, when I tried it out by hand I ended up with errors such as: ``` Resource /subscriptions/108d46d5-fe9b-4850-9a7d-8c914aa6c1f0/resourceGroups/rg-central-us-taskgraph-t/providers/Microsoft.Network/virtualNetworks/vn-central-us-taskgraph-t/subnets/sn-central-us-taskgraph-t referenced by resource /subscriptions/108d46d5-fe9b-4850-9a7d-8c914aa6c1f0/resourceGroups/rg-taskcluster-worker-manager-production/providers/Microsoft.Network/networkInterfaces/nic-qf0rebyslglv1wvqkn9d was not found. Please make sure that the referenced resource exists, and that both resources are in the same region. ``` ...so I suspect something else will be needed.
29d01f8 to
f3c8388
Compare
I'd like to start running taskgraph tests on Windows and macOS (taskcluster/taskgraph#842). This ought to add a usable Windows worker pool. Unfortunately, when I tried it out by hand I ended up with errors such as: ``` Resource /subscriptions/108d46d5-fe9b-4850-9a7d-8c914aa6c1f0/resourceGroups/rg-central-us-taskgraph-t/providers/Microsoft.Network/virtualNetworks/vn-central-us-taskgraph-t/subnets/sn-central-us-taskgraph-t referenced by resource /subscriptions/108d46d5-fe9b-4850-9a7d-8c914aa6c1f0/resourceGroups/rg-taskcluster-worker-manager-production/providers/Microsoft.Network/networkInterfaces/nic-qf0rebyslglv1wvqkn9d was not found. Please make sure that the referenced resource exists, and that both resources are in the same region. ``` ...so I suspect something else will be needed.
c86db17 to
bc5da0e
Compare
3125046 to
e91a1a3
Compare
e91a1a3 to
6d4dd73
Compare
A number of tests currently fail on Windows. Some of them seem like they'll never work, while we may able to get some of them passing with some work. In the short term, just mark them as skipped to allow Windows in CI to land.
6d4dd73 to
81c6b3a
Compare
| command: >- | ||
| python3 -V && | ||
| pwd && | ||
| powershell -ExecutionPolicy ByPass -c 'irm https://astral.sh/uv/install.ps1 | iex' && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fyi there's an exec-with: powershell key you could add here to just execute the payload via powershell entirely:
https://github.com/taskcluster/taskgraph/blob/main/src/taskgraph/transforms/run/run_task.py#L80
Just mentioning it in case you weren't aware and this somehow makes things easier. The solution you ended up with is totally fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL - that's useful to know. I think I'll stick with what I have, partly because I know it works, and partly because the powershell is only there because it's the recommended way to install uv on Windows. Keeping this bash-oriented is useful for consistency, I think.
81c6b3a to
a040213
Compare
There's a number of tests that currently fail on Windows. This PR marks them as skipped. Some of them might pass with some work, but I'd prefer to get basic tests running sooner.
One notable downside to this is that because of how long it often takes to spin up Windows workers, getting full CI results takes longer than it used to. I think this is preferable to having no coverage...but opinions may vary. One way to work around this would be to run Windows (and maybe Mac?) tests on GHA instead, as weird and awful as that seems for Taskgraph.