Repository navigation
Issues #56/#57: real K8s exec + batch-pod support in Containerized.Kubernetes (feeds #36 Stage C, #52 harness) - #58
Merged
Conversation
5 tasks
larsbuch
force-pushed
the
vibe/k8s-exec-batch-pods-293624
branch
2 times, most recently
from
November 29, 2026 12:24
927a100 to
22c8783
Compare
…bernetes (feeds #36 Stage C and the #52 local harness) - #56: KubernetesOrchestrator.ExecuteAsync now runs a real Kubernetes exec (IKubernetes.NamespacedPodExecAsync, SPDY) instead of the NotImplementedException SimulateExecution placeholder; InputData goes to the process stdin (default command /app/plugin-executor, overridable via ExecutionConfiguration["command"]), ContainerExecutionResult carries real exit code/stdout/stderr/duration, and ContainerExecutionRequest.Timeout kills the exec on deadline (linked CTS) and reports a failed result; caller cancellation still propagates as OCE - #57: CreateContainerAsync treats Succeeded as terminal (returns Stopped instead of a Ready-timeout for batch-style plugin pods), fails fast with the kubelet reason on Failed phase / Pending+Status.Reason / container waiting reasons (CreateContainerError, ImagePullBackOff, ...) / non-zero terminated exit codes; ContainerSpec gains Command/Args entrypoint overrides, ContainerSecurity gains RunAsUser; pod-ready polling configurable via PodReadyMaxAttempts/PollIntervalMs - K8s transport moved behind protected virtual wrappers (CreatePodAsync/ReadPodAsync/ DeletePodAsync/ListPodsAsync/ExecInPodAsync) as the fakeable seam for tests/harness - Tests: hermetic KubernetesOrchestratorTests (mocked NamespacedPodExecAsync + fake cluster) and live KubernetesLiveContractTests gated on CRPCF_K8S_LIVE_TESTS=1 for local k8s-testkit-style runs (#52) - Docs: CRPCF_DEPLOYMENT_GUIDE #8 documents the fixed Kubernetes backend contract, image requirements/per-plugin security overrides, and the #56/#57 minimum version (#36); CHANGELOG updated Co-authored-by: larsbuch <larsbuch@users.noreply.github.com>
larsbuch
force-pushed
the
vibe/k8s-exec-batch-pods-293624
branch
from
November 29, 2026 12:24
22c8783 to
b8644ea
Compare
larsbuch
marked this pull request as ready for review
November 29, 2026 12:27
This was referenced Nov 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the two blockers found by the k8s-testkit v7 released-package suite, and updates the #36 consumption docs so the Containerized packages on the DevelApp-ai GitHub Packages feed are actually usable for Taskhandler M10 Stage C — and so the #52 container-runtime leg can later be run locally through a test harness.
KubernetesOrchestrator.ExecuteAsyncnow performs a real Kubernetes exec (IKubernetes.NamespacedPodExecAsync, SPDY) instead of throwingNotImplementedExceptionfrom theSimulateExecutionplaceholder.InputDatais written to the process stdin; the command defaults to/app/plugin-executorand is overridable per request viaContainerExecutionRequest.ExecutionConfiguration["command"].ContainerExecutionResultnow carries the real exit code, stdout, stderr and measuredExecutionTime;ContainerExecutionRequest.Timeoutkills the exec on deadline (linked CTS) and reportsSuccess=false, ExitCode=-1; caller cancellation still propagates asOperationCanceledException.CreateContainerAsyncno longer assumes long-running pods: a completing (batch-style) pod reachesSucceededand returnsContainerInstanceStatus.Stoppedinstead of a Ready-timeout. Creation failures fail fast with the kubelet reason (Failedphase,Pending+Status.Reason, containerwaitingreasons likeCreateContainerError/ImagePullBackOff/CrashLoopBackOff, non-zeroterminatedexit codes).ContainerSpecgainsCommand/Args;ContainerSecuritygainsRunAsUser; poll budget is configurable (PodReadyMaxAttempts/PodReadyPollIntervalMs).protected virtualwrappers (CreatePodAsync/ReadPodAsync/DeletePodAsync/ListPodsAsync/ExecInPodAsync), so harnesses can fake the cluster;IContainerOrchestratorremains the consumer-facing fake seam (Publish CRPCF Containerized to GitHub Packages — unblocks Taskhandler M10 Stage C #36 item 6).KubernetesOrchestratorTests(12 tests: mockedNamespacedPodExecAsyncfor the exec path incl. stdin delivery/exit code/stderr/timeout/command override, fake-cluster lifecycle incl. Succeeded→Stopped, CreateContainerError fail-fast, Command/Args/RunAsUser wiring) andKubernetesLiveContractTestsgated onCRPCF_K8S_LIVE_TESTS=1(real exec on a live cluster + batch-pod completion — the k8s-testkit suite 11 cases B/C shape, runnable locally for Real Docker/K8s container-runtime measurement leg of M2 on Z13 hardware (postponed) #52). Live tests are inconclusive in CI (no cluster), keeping the suite hermetic.CRPCF_DEPLOYMENT_GUIDE.md§8 now documents the fixed Kubernetes backend contract (exec protocol, timeout semantics, result shape, batch pods, fail-fast reasons), image requirements + per-pluginContainerSecurityoverrides (§8.5), and the Containerized.Kubernetes: ExecuteAsync throws NotImplementedException (SimulateExecution placeholder) in released packages #56/Containerized.Kubernetes: CreateContainerAsync assumes long-running pods; completing (batch-style) plugin pods time out and ContainerSpec cannot override the command #57 fix release as the minimum pin for real dispatch (§8.6). CHANGELOG updated.Verification
pr-validation.yml: restore, build solution, both test projects, warning grep) is the verification gate. The exec API usage was verified against the KubernetesClient v17.0.14 sources (IKubernetes.NamespacedPodExecAsync(name, namespace, container, command, tty, ExecAsyncCallback, ct) → Task<int>;ExecAsyncCallback(Stream, Stream, Stream)).dotnet test RuntimePluggableClassFactory.Containerized.Tests(CI) runs the new hermetic tests; live tests self-skip withoutCRPCF_K8S_LIVE_TESTS=1.CRPCF_K8S_LIVE_TESTS=1 KUBECONFIG=<local cluster> dotnet test RuntimePluggableClassFactory.Containerized.Tests --filter KubernetesLiveContractTests.KubernetesClient 17.0.14pin → §8.1 dependency graph and the NU1903-clean audit still hold); the packages publish to GitHub Packages on push tomainvia the existingdotnet-cicd.yml(Publish CRPCF Containerized to GitHub Packages — unblocks Taskhandler M10 Stage C #36).Closes #56
Closes #57