-
Notifications
You must be signed in to change notification settings - Fork 25
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
Swift implementations to use macOS 14 runners + testcontainers #345
Conversation
Thanks Jack! For the Pkl source, it's at: Instead of not using Testcontainers, a while back I remember trying to use some other docker daemon thing on Apple Silicon. I can investigate that more as it'd be nice to stick with Testcontainers for these. |
Hey James, The history of macOS runners in GitHub Action, from my investigation is:
So with that, I only saw two options:
GitHub is phasing out support for |
Oh, about PKL, I did see that file, but it appears to reference components not defined within (unless I'm missing it somehow)? Specifically, I see references to GitHubAction.Swift.testSteps(), but couldn't find the definition of it. |
Thanks Jack for investigating. Oh it was Colima and I'd thought I'd seen someone getting it working with Testcontainers on For |
Yeah, so it does seem that no one has gotten Colima to work on |
Ok, I got Testcontainers Cloud setup but I think the |
Is the idea that we'd have the scenarios running in Testcontainers Cloud, and just controlling it from GitHub Actions? I can have a look at it depending on how this is set up. But yeah, Swift never had Testcontainers support, so I just implemented the minimal amount of equivalent features I needed using |
Yeah, that is the idea but I need to see if we can configure the |
Here is what the Testcontainer folks say:
You should be able to sign up for a free Testcontainers account and give this a try (with the agent running locally). Or I can look more into it later. |
I was afraid they were going to need TCP Docker access. IIRC, the Swift one currently only supported UNIX domain sockets. I'll double check though.
Regards,
Jack
… On Jun 10, 2024, at 1:28 PM, James Ward ***@***.***> wrote:
Here is what the Testcontainer folks say:
~/.testcontainers.properties will contain tc.host that is a standard Docker host that you can point the client to (assuming that your client supports TCP docker hosts)
You should be able to sign up for a free Testcontainers account and give this a try (with the agent running locally). Or I can look more into it later.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Looks like maybe there is a way to expose the TCP socket as a file socket: |
Ah, good find. So I confirmed that docker-client-swift indeed does not support TCP. I tried using a fork of it that's supposedly more feature complete, including TCP support, but that's having problem just with regular Docker (AFAIK, it's having trouble parsing Docker JSONs, so maybe API incompatibility). My next plan was to just use the Intel-based I'll give |
As of the current version of this branch, GitHub Actions is:
However, scenario 3 (the 10k connection one) keeps failing. I'm not sure if this is due to a limitation of Testcontainers Cloud (I think it tunnels the exposed ports over SSH?) or just some tuning we need to do. I'll probably try and figure what's failing exactly this weekend. |
Wow! Amazing work Jack! If we need to loop in the Testcontainers folks, let me know :) |
Hey James, I'm getting this error with swift-async:
With go-stdlib:
With scala-ox:
|
8ec9c75
to
ff181ad
Compare
So I've created a bunch of PRs for the Swift implementations. Longer term, I'm hoping with support for nested virtualization in the M2+ processors (assuming Apple provides the software support), GitHub Actions will at some point in the future support containerization again. In the meantime, we have two options:
Independently from this, I've also implemented Scenario 10: The first two will fail checks as of now, but succeeds in GitHub Actions without containerization (swift-async, swift-combine). The third is set up to use ubuntu-latest, and will run fine as is. |
Thanks Jack! I've opened an issue with Testcontainers Cloud to see if they can increase the number of concurrent connections. I'll let you know what I find out. |
6c75342
to
4a248dd
Compare
Let me know if they've responded. In the meantime, it appears Apple will start supporting nested virtualization on macOS 15.0, but only on M3 chips and higher:
I can revisit when GitHub Actions get that hardware/OS. |
The Testcontainers Cloud folks are investigating. In the meantime, I noticed this: |
Testcontainers Cloud has rolled out a fix so we should be good to give that approach a try again. |
I was going to respond to this, so two things:
Unrelated, but just for the heck of it, I tried using Docker Desktop to see if it would work, and it failed due to nested virtualization issues, not surprisingly. |
Sweet, time to give it another go. |
I just re-ran this without any code changes, and we are still getting the same error. Do you know if we'll need to update anything (e.g., re-generate token)? |
It is possible you need to be using a non-free Testcontainers Cloud account. The account I'm using for this repo is non-free, so we might have to test on this repo. |
Ah OK. Let me push some random change. I believe that should cause the checks in this PR to re-run. |
Looks like you'll have to add the Testcontainers Cloud token to this repository first (using
Alternatively, if you've already defined the secret, but used a different name, let me know what name you used, and I'll update the GHA YAML to reflect that. |
I have defined that, but it looks like by default PRs don't get the secrets (which makes sense from a security perspective). I might just have to test this in prod :) Should I just merge this and see if it works? |
Also, I invited you as a collaborator so you don't need to go through PRs to work through this. |
Sure. I don't think it'll be any more broken than it is now. :D |
(Use this or #363, but not both, this one uses testcontainers, but scenario 3 fails)
Main purpose of this PR is to get the Swift implementations on the latest GitHub Actions macOS infrastructure before I start working on scenario 10.
Changes include:
swift-async and swift-combine
swift-dispatch: