Repository navigation
Conversation
The main goal here is to ensure that the generated client-side APIs are matching the engine being published with. This requires that we use `./hack/make-prod` when calling publish in CI, which is currently the case already. Signed-off-by: Erik Sipsma <[email protected]>
|
I just realized that this creates a catch 22 around the Go SDK specifically, fortunately that will also be solved by the solution mentioned in this issue: #4041 To explain, the CI automation uses the Go SDK to setup the go linting, w/ dagger-in-dagger used to expose the engine api back to it. But that means we are linting against the engine created by the non-replaced Go SDK version in our go.mod, which is the previous vesion. Basically, we can't release the Go SDK until we have upgraded it and can't upgrade it until we have released it. The fix to the linked issue will address this because it'll result in the Go SDK actually doing full provisioning inside the exec rather than using dagger-in-dagger, so it'll use the actual engine dependency from the SDK's main. It'll also just be way simpler to think about in general thankfully... I'm marking this as a draft for now; will undraft once I merge the fix for that linked issue (working on it now) |
|
@sipsma How can it be not the case since every commit in main should be linted already? edit because of make-prod, I already forgot |
@aluzzardi it's linted against the dev engine, which is not the latest released one. |
With the proposed solution in #4041 this linting couldn't be possible anymore, right(-ish)? Since it will overall simplify everything and get rid of make/make-prod |
No I've realized as I started working on that issue that even though it simplifies things we still want both ./make and ./make-prod. The reason is that even though we simplify by only running the mage code with one pinned go sdk version, we still need to run the code inside the execs sometimes against the dev engine and sometimes against the prod one. Linting is actually a perfect example:
I think testing is probably the same thing. I'm approaching this by just never using the |
|
If we |
|
I'm really missing a diagram now that explains how all of this works. There are too many layers, dependencies and state transitions to keep everything in my head. Want to pair-up on this @sipsma? Btw, this really helped in the context of https://github.com/dagger/dagger.io/pull/1275 |
|
This is a starting point which helped me visualise what we are missing: flowchart LR
branch(main)
tde([Test with DevEngine])
lde([Lint with DevEngine])
DevEngine --> tde --> |"✅"| branch
DevEngine -.- DevGoSDK --> tde & lde --> |"✅"| branch
DevEngine -.- DevPythonSDK --> tde & lde --> |"✅"| branch
DevEngine -.- DevNodejsSDK --> tde & lde --> |"✅"| branch
tpe([Test with PublishedEngine])
lpe([Lint with PublishedEngine])
branch --> publish([Publish]) --> PublishedEngine & PublishedCLI
PublishedEngine --> TaggedGoSDK --> tpe & lpe --> |"✅"| PublishedGoSDK
PublishedEngine --> TaggedPythonSDK --> tpe & lpe --> |"✅"| PublishedPythonSDK
PublishedEngine --> TaggedNodejsSDK --> tpe & lpe --> |"✅"| PublishedNodejsSDK
PublishedCLI --> S3(dl.dagger.io/dagger) & brew-tap(github.com/dagger/homebrew-tap)
Rather than have separate workflows that publish SDKs individually, we should have a single |
|
We spent some time with @sipsma to capture what happens when we run Go SDK tests: flowchart TD
make(./hack/make sdk:go:test)
dev(./hack/dev go run main.go sdk:go:test)
dev -.- sdk -.- test
StableGoSDK(Go SDK: dagger.io/dagger v0.4.1) ==> dev
sdk(Go SDK) --> |mount| docker-container://test-dagger-engine
make --> dev ==> |provision ghcr.io/dagger/dagger:v0.3.6| docker-container://dagger-engine-sha256
build --> tar(/tmp/dagger-engine-export)
tar --> |load & run| docker-container://test-dagger-engine
subgraph Docker
subgraph docker-container://dagger-engine-sha256
build
end
subgraph docker-container://test-dagger-engine
subgraph buildkit-exec
binary(DAGGER_HOST=bin:///.dagger_engine_session)
socket(DAGGER_RUNNER_HOST=unix:///dagger-runner.sock)
test(go test)
end
end
end
While the above renders in GitHub mermaid, some details are missing. Here's a link to the original graph. |
|
Closing as this turned out to not yet be possible due to an independent bug, explained more in the PR here: #4087 We will want this in general but it will take a bit to get there, specifically we'll need to have SDKs use the CLI as downloaded from S3 instead of the engine-session bin pulled from images. |
The main goal here is to ensure that the generated client-side APIs are matching the engine being published with. This requires that we use
./hack/make-prodwhen calling publish in CI, which is currently the case already.Signed-off-by: Erik Sipsma [email protected]
PTAL @gerhard
cc @slumbering @grouville goal here is to prevent future occurrences of the issue that happened today where the node sdk was published w/ unix socket APIs even though the released engine did not have them.