mirror of
https://github.com/moby/buildkit.git
synced 2026-08-05 07:10:23 +00:00
copy containerd.UnknownExitStatus to local const
Copy this const to a local constant to prevent importing the containerd client in the front-end. For consistency, I also updated the executor code to use the same const, although not strictly needed. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -380,7 +380,7 @@ func (w *containerdExecutor) runProcess(ctx context.Context, p containerd.Proces
|
||||
ExitCode: status.ExitCode(),
|
||||
Err: status.Error(),
|
||||
}
|
||||
if status.ExitCode() == containerd.UnknownExitStatus && status.Error() != nil {
|
||||
if status.ExitCode() == errdefs.ContainerdUnknownExitStatus && status.Error() != nil {
|
||||
exitErr.Err = errors.Wrap(status.Error(), "failure waiting for process")
|
||||
}
|
||||
select {
|
||||
|
||||
@@ -12,7 +12,6 @@ import (
|
||||
"syscall"
|
||||
"time"
|
||||
|
||||
"github.com/containerd/containerd"
|
||||
"github.com/containerd/containerd/mount"
|
||||
containerdoci "github.com/containerd/containerd/oci"
|
||||
"github.com/containerd/continuity/fs"
|
||||
@@ -335,7 +334,7 @@ func (w *runcExecutor) Run(ctx context.Context, id string, root executor.Mount,
|
||||
func exitError(ctx context.Context, err error) error {
|
||||
if err != nil {
|
||||
exitErr := &errdefs.ExitError{
|
||||
ExitCode: containerd.UnknownExitStatus,
|
||||
ExitCode: errdefs.ContainerdUnknownExitStatus,
|
||||
Err: err,
|
||||
}
|
||||
var runcExitError *runc.ExitError
|
||||
|
||||
Reference in New Issue
Block a user