Repository navigation
Replace engine-session binary w/ cli session cmd. - #4145
Conversation
Signed-off-by: Erik Sipsma <[email protected]>
|
The tests pass consistently for me locally, not sure why they fail here consistently... Looking into it. EDIT: it was an issue w/ dagger-in-dagger (which is still used via the extension tests we have). Didn't hit it locally because of caching. The fix to this ended up being pretty nice actually, simplified a lot, describe it in |
This is partially needed just due to the updates around the new _EXPERIMENTAL_* env vars interpreted by the SDKs. But it also ends up being a pretty big simplification. When dagger-in-dagger is enabled, the shim just opens a new session and serves it over localhost, setting DAGGER_SESSION_* in the same way that dagger run does. There's no longer any need for mounting in a bin or the buildkitd socket and no needed for any socket proxying of the session/buildkit api. Signed-off-by: Erik Sipsma <[email protected]>
Signed-off-by: Erik Sipsma <[email protected]>
| popd | ||
|
|
||
| export DAGGER_HOST=docker-container://test-dagger-engine | ||
| export _EXPERIMENTAL_DAGGER_CLI_BIN=$DAGGER_SRC_ROOT/bin/dagger |
|
|
||
| export DAGGER_HOST=docker-container://test-dagger-engine | ||
| export _EXPERIMENTAL_DAGGER_CLI_BIN=$DAGGER_SRC_ROOT/bin/dagger | ||
| export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://test-dagger-engine |
There was a problem hiding this comment.
extremely small nit: any chance we can get rid of this, since now it's all encapsulated in the CLI and we control what it does
There was a problem hiding this comment.
Yeah I considered that briefly, it would require using -X to overwrite the binary's default runner host (but right now -X is only used to set the version stamp, so more refactoring would be needed). I guess I'm not sure that's worth it yet since it would be a lot of lines of code to replace just this one.
| """Error while provisioning the Dagger engine.""" | ||
|
|
||
|
|
||
| @register_engine("http") |
There was a problem hiding this comment.
I didn't get the chance to review. It's not necessary to register this. This line should be removed.
There was a problem hiding this comment.
Hey, sorry about that, this PR was mostly just an intermediate step before the last step in this effort which is to have the SDKs all download the binary from S3 instead of pulling them from the docker image. As part of that I am deleting and refactoring tons of code across the SDKs, so I wanted to get PR in first and then clean everything up in that next one. I'll clean this up there and wait for your approval on that one 🙏
Major changes:
sessionis a hidden subcommand of the CLIdagger runusage.The next+final step in this effort is to have the SDKs download the CLI from S3 rather than grabbing it out of the engine image.
NOTE: there's a lot of awkward ugly code around first trying DAGGER_SESSION_URL, then _EXPERIMENTAL_DAGGER_CLI_BIN, then finally falling back to the previous code that used DAGGER_HOST.