Repository navigation
ci: Test Engine provisioning on MacOS - #3774
Conversation
|
This is awesome! Will save us so much manual testing time
I'm surprised by this as the specs of the machine aren't great but not so bad that I would have thought they should take an hour. From https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources Looking at the actual run, it seems like by far the longest part is one of the multiplatform tests: Wouldn't be surprised if it's the one where you are using emulation. Still weird though. How about we only run the SDK tests on mac os? So just starting with go, that would mean we do something like |
|
Great idea! No need to have a different workflow though, we can use a matrix instead. Something like: jobs:
sdk-go:
name: sdk / go
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps: |
da22a50 to
4a31c5b
Compare
|
@aluzzardi @sipsma. Since yesterday's rebase, I keep failing on ( I believe it is related to #3793 |
720d45c to
4469811
Compare
99f191a to
46e30c5
Compare
|
@grouville Took a look, the tests all pass on my macbook as is (starting from clean slate, no local images pulled or anything) and I found that if I decrease the parallelism of the test case (run 5 provisions in parallel instead of 30), then CI seems to pass too. The strange part is that we should be getting more output from the logs showing an error. After you updated to use My only guess (and it's very much just a guess at this point):
For now, just pushed a commit that lowers the parallelism to 5, which I'm okay with merging for now since 30 was a pretty arbitrary choice before. I also have a separate commit that I'll send out in a different PR that makes it so those log messages are put in the error message even if |
46e30c5 to
729d227
Compare
I still think we don't need a separate workflow. Is there a reason why we need custom tests for Mac? |
3df2b3b to
6973506
Compare
From what I understood, we want to natively run the tests to avoid relying on Dagger-in-Dagger, which skips the provisioning part of our tests: #3225 (comment)
As MacOS minutes are quite expensive, I talked with Gerhard this morning. Maybe running it only on Wdyt @aluzzardi @sipsma ? |
e936c41 to
66263ad
Compare
|
The action seems to be flaky (working ~50% of the time), or times out (indefinitely waits on Docker Desktop to be running). Forking the action (once my job on the scrapper is done), to tweak it and make it more sustainable |
c45e72f to
a76703d
Compare
|
@sipsma I talked with Andrea yesterday, we found an agreement on the future of this PR: make it a periodic check (once a day), and rename it as as
I believe it is due due to a conflict between |
SGTM!
Yeah I think we should still do that. Dagger-in-dagger only allows us to run linux binaries so we can't test the macos specific behavior with that. Unfortunate but I don't see any way around it for now. We only need to run these provisioning tests on the macos host directly though; nothing else is needed.
It's not super clear immediately what would cause that error. Is it possible to add a step that prints the logs of the container to the workflow (similar to this)? The output you showed there makes me think the actual engine container is not running or is being very very slow to start, but it's hard to say without more info. In general, it's not expected that those test cases would interfere with one another. The only thing I can think of is that |
I was originally confused by this PR because I thought the goal was to run the tests on macOS, and I didn't understand why we wouldn't just do a matrix on the tests we already have. Turns out the goal is to test provisioning outside of dagger-in-dagger So I suggested to just call these "provisioning-test". Right now macOS only (maybe Linux wouldn't hurt?) but someday Windows probably. |
|
Started looking into this. |
|
This is almost there:
|
- Run our integration suite against a native MacOS pipeline, with the install of Docker Desktop in headless mode - Multiple MacOS versions could easily be implemented. - Currently triggered on PRs, but it is quite long (~1h), wdyt ? - Runs our integration tests, as these are the currently manual steps required on Mac Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
- Test Python SDK - Test Go SDK Signed-off-by: Guillaume de Rouville <[email protected]>
Lowering it to 5 parallel tests (to keep it consistent with the Go SDK). We had to reduce the amount because virtualization on MacOS runners is very slow: - it led to timeouts / inconsistencies - MacOS minutes are 10x more expensive, this number was arbitrary, and 5 is ok. We will save a lot of CI minutes Signed-off-by: Guillaume de Rouville <[email protected]>
Signed-off-by: Guillaume de Rouville <[email protected]>
db9f3c5 to
16310d1
Compare
- rebase on top of main - Set parallelism in SDKs to amount of logical CPUs - add workflow-dispatch Signed-off-by: Guillaume de Rouville <[email protected]>
16310d1 to
cb7c7d1
Compare
We want it as similar to test, lint & publish as possible. Signed-off-by: Gerhard Lazu <[email protected]>
Windows container support on hosted GitHub Actions runners is unlikely: actions/runner#904 Linux we get for free via our existing tests. For the time being, let's keep this one simple, remove the matrix, and stick to macOS only. Rework the steps so that they are grouped together: - First: setup Docker - Then: checkout repository - Next: setup Go & run Go SDK tests - Last: setup Python & run Python SDK tests Signed-off-by: Gerhard Lazu <[email protected]>
Signed-off-by: Gerhard Lazu <[email protected]>
c6c773e to
a9f2920
Compare
gerhard
left a comment
There was a problem hiding this comment.
|
Is the provision workflow being triggered when a new engine is published? Shouldn't the tests be run against a Anyway, not sure why that module wasn't installed in this particular job. |
|
Re-ran locally on my fork: https://github.com/grouville/dagger/actions/runs/3583501774/jobs/6029004809 (To debug) For the 1 vs 3x runs, I believe it is due to our: It gets triggered for each update, however, I wouldn't surprised if the last deployment impacted the package 3 times (the main + one for each architecture): |
Yes, that makes sense. Do you know @grouville if the manifest which gets tagged as |
I was under the impression that's what we were doing. Did we miss this @grouville?
This passed before we merged this PR: https://github.com/grouville/dagger/actions/runs/3576435891/jobs/6014239024#step:9:96 Did something change? Have hit my time box for this, will need to leave it for another day. |
We run it after the new engine is published, not before. But I thought this was what we wanted to do.
Breaks too on my fork. Whenever I run the code locally, againstthe latest main branch, it's the same issue. Currently exploring the root cause. It might be a package bump (as we're using latest) |
As I said in #4037 (comment), I think there's issues with dependabot so this may have been introduced by: |
|
FWIW, there is a follow-up diagram here #4065 (comment) We still need to add provisioning tests part of publishing, before we actually publish anything (potentially) broken. @grouville has the context. |





Closes #3225
cc @sipsma @gerhard