pierodesalvia commented on PR #32059:
URL: https://github.com/apache/beam/pull/32059#issuecomment-2264881289
This affects many projects using beam.
This is the patch that fixes it:
diff --git a/sdks/go/pkg/beam/runners/prism/internal/environments.go
b/sdks/go/pkg/beam/runners/prism/internal/environments.go
index 3a429920fb2..9ff1ac27700 100644
--- a/sdks/go/pkg/beam/runners/prism/internal/environments.go
+++ b/sdks/go/pkg/beam/runners/prism/internal/environments.go
@@ -19,6 +19,7 @@ import (
"bytes"
"context"
"fmt"
+ "github.com/docker/docker/api/types/image"
"io"
"os"
@@ -32,7 +33,6 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/protobuf/proto"
- dtyp "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
dcli "github.com/docker/docker/client"
@@ -132,7 +132,7 @@ func dockerEnvironment(ctx context.Context, logger
*slog.Logger, dp *pipepb.Dock
}
if _, _, err := cli.ImageInspectWithRaw(ctx, dp.GetContainerImage());
err != nil {
// We don't have a local image, so we should pull it.
- if rc, err := cli.ImagePull(ctx, dp.GetContainerImage(),
dtyp.ImagePullOptions{}); err == nil {
+ if rc, err := cli.ImagePull(ctx, dp.GetContainerImage(),
image.PullOptions{}); err == nil {
// Copy the output, but discard it so we can wait until
the image pull is finished.
io.Copy(io.Discard, rc)
rc.Close()
@@ -164,7 +164,7 @@ func dockerEnvironment(ctx context.Context, logger
*slog.Logger, dp *pipepb.Dock
containerID := ccr.ID
logger = logger.With("container", containerID)
- if err := cli.ContainerStart(ctx, containerID,
dtyp.ContainerStartOptions{}); err != nil {
+ if err := cli.ContainerStart(ctx, containerID,
container.StartOptions{}); err != nil {
cli.Close()
return fmt.Errorf("unable to start container image %v with
docker for env %v, err: %w", dp.GetContainerImage(), wk.Env, err)
}
@@ -189,7 +189,7 @@ func dockerEnvironment(ctx context.Context, logger
*slog.Logger, dp *pipepb.Dock
case resp := <-statusCh:
logger.Info("docker container has self terminated",
"status_code", resp.StatusCode)
- rc, err := cli.ContainerLogs(ctx, containerID,
dtyp.ContainerLogsOptions{Details: true, ShowStdout: true, ShowStderr: true})
+ rc, err := cli.ContainerLogs(ctx, containerID,
container.LogsOptions{Details: true, ShowStdout: true, ShowStderr: true})
if err != nil {
logger.Error("docker container logs error",
"error", err)
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]