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
feat: enable streaming exec output in container engine [stream exec pt. 1] #1043
Conversation
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.
Globally it looks good! Though the StreamWriter frightens me, wondering if we really need it
...ainer-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/docker_kurtosis_backend.go
Show resolved
Hide resolved
...er/docker_kurtosis_backend/user_services_functions/run_user_service_exec_command_streamed.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/kubernetes_manager.go
Outdated
Show resolved
Hide resolved
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.
I think now you can simplify the StreamWriter since you don't need the bytes buffer, but the rest looks good 👍
One thing I was thinking while doing the second review is that we don't have to use a "Read entire line" mechanism, we could just use a regular/fixed-size bytes buffer and send the buffer through the channel directly. Would that work?
The reason I'm raising this is b/c if the output line you're reading is more than 4Mb, you'll hit the GRPC limit again, which is quite annoying. Using a fixed-size buffer would be quite clean and also alleviate this GRPC limitation. Wdyt?
container-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/kubernetes_manager.go
Outdated
Show resolved
Hide resolved
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.
Coolios, so I guess this works but are we still safeguarding against lines that would be bigger than 4MB? I just want to make sure we're not re-introducing the bug Gyani fixed a few weeks ago.
I think there's a clean way to fix that bug here by streaming fixed-size byte chunks, instead of non-fixed-size output lines, but I'm fine keeping that for a future improvement
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/docker/docker_manager/docker_manager.go
Outdated
Show resolved
Hide resolved
container-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/kubernetes_manager.go
Outdated
Show resolved
Hide resolved
🤖 I have created a release *beep* *boop* --- ## [0.81.6](0.81.5...0.81.6) (2023-08-11) ### Features * add more endpoints to support the Cloud ([#1077](#1077)) ([1d70382](1d70382)) * enable streaming exec output in container engine [stream exec pt. 1] ([#1043](#1043)) ([e8f34ef](e8f34ef)) * implement new logging architecture v0 ([#1071](#1071)) ([c66c148](c66c148)) * make enclave namespace and network naming deterministic ([#1100](#1100)) ([0d42106](0d42106)) * Persist file artifacts ([#1084](#1084)) ([c7b3590](c7b3590)) * Portal automatic start and stop on context change ([#1086](#1086)) ([a6a73d1](a6a73d1)), closes [#970](#970) * Update files if already present in enclave ([#1066](#1066)) ([1135543](1135543)) ### Bug Fixes * Add API key to endpoint ([#1102](#1102)) ([64f0c20](64f0c20)) * Fix issue with idempotent plan resolution ([#1087](#1087)) ([fd48f8f](fd48f8f)) * Forward the engine port after verifying that an engine container is running and before initializing the engine client ([#1099](#1099)) ([b0b7a3b](b0b7a3b)) * update golang docker client to latest ([#1082](#1082)) ([724084f](724084f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: kurtosisbot <kurtosisbot@users.noreply.github.com>
Description:
Enables streaming output of exec commands out of docker and k8s as they are being run on services.
Is this change user facing?
NOT THIS PR (but stream exec pt. 2 will be)