From 7a4997c6349bba3a05a2876a94fd241b4965bdf0 Mon Sep 17 00:00:00 2001 From: Easton Crupper <65553218+ecrupper@users.noreply.github.com> Date: Thu, 12 Sep 2024 09:23:12 -0400 Subject: [PATCH] chore(outputs): update comments (#595) --- executor/linux/opts.go | 3 ++- executor/linux/outputs.go | 2 +- runtime/kubernetes/container.go | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/executor/linux/opts.go b/executor/linux/opts.go index caf6e7a4..686485ba 100644 --- a/executor/linux/opts.go +++ b/executor/linux/opts.go @@ -185,11 +185,12 @@ func WithVersion(version string) Opt { } } +// WithOutputCtn sets the outputs container in the executor client for Linux. func WithOutputCtn(ctn *pipeline.Container) Opt { return func(c *client) error { c.Logger.Trace("configuring output container in linux executor client") - // set the version in the client + // set the outputs container in the client c.OutputCtn = ctn return nil diff --git a/executor/linux/outputs.go b/executor/linux/outputs.go index 00c02db5..8a6e7cea 100644 --- a/executor/linux/outputs.go +++ b/executor/linux/outputs.go @@ -60,7 +60,7 @@ func (o *outputSvc) destroy(ctx context.Context, ctn *pipeline.Container) error return nil } - // update engine logger with secret metadata + // update engine logger with outputs metadata // // https://pkg.go.dev/github.com/sirupsen/logrus#Entry.WithField logger := o.client.Logger.WithField("outputs", ctn.Name) diff --git a/runtime/kubernetes/container.go b/runtime/kubernetes/container.go index 55c14364..36e9ff9d 100644 --- a/runtime/kubernetes/container.go +++ b/runtime/kubernetes/container.go @@ -69,6 +69,8 @@ func (c *client) RemoveContainer(ctx context.Context, ctn *pipeline.Container) e return nil } +// PollOutputsContainer captures the `cat` response for a given path in the Docker volume. +// This is a no-op for kubernetes. Pod environments cannot be dynamic. func (c *client) PollOutputsContainer(ctx context.Context, ctn *pipeline.Container, path string) ([]byte, error) { c.Logger.Tracef("no-op: removing container %s", ctn.ID)