Skip to content
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

Legacy executors are executors after all #9304

Merged
merged 2 commits into from
Nov 10, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions drivers/shared/executor/legacy_executor_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ type legacyExecutorWrapper struct {
logger hclog.Logger
}

// validate that legacyExecutorWrapper is an executor
var _ Executor = (*legacyExecutorWrapper)(nil)

func (l *legacyExecutorWrapper) Launch(launchCmd *ExecCommand) (*ProcessState, error) {
return nil, fmt.Errorf("operation not supported for legacy exec wrapper")
}
Expand Down Expand Up @@ -133,6 +136,11 @@ func (l *legacyExecutorWrapper) Exec(deadline time.Time, cmd string, args []stri
return l.client.Exec(deadline, cmd, args)
}

func (l *legacyExecutorWrapper) ExecStreaming(ctx context.Context, cmd []string, tty bool,
stream drivers.ExecTaskStream) error {
return fmt.Errorf("operation not supported for legacy exec wrapper")
}

type pre09ExecutorRPC struct {
client *rpc.Client
logger hclog.Logger
Expand Down