Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Feb 21, 2024
1 parent 79534d1 commit e3fe962
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions flyteplugins/go/tasks/plugins/webapi/agent/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"encoding/gob"
"fmt"
"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/service"
"io"
"time"

"golang.org/x/exp/maps"
Expand Down Expand Up @@ -158,9 +157,12 @@ func (p Plugin) ExecuteTaskSync(
}

Check warning on line 157 in flyteplugins/go/tasks/plugins/webapi/agent/plugin.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/webapi/agent/plugin.go#L156-L157

Added lines #L156 - L157 were not covered by tests

in, err := stream.Recv()
if err != nil && err != io.EOF {
if err != nil {
return nil, nil, err
}

Check warning on line 162 in flyteplugins/go/tasks/plugins/webapi/agent/plugin.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/webapi/agent/plugin.go#L161-L162

Added lines #L161 - L162 were not covered by tests
if in.GetHeader() == nil {
return nil, nil, fmt.Errorf("expected header in the response, but got none")
}

Check warning on line 165 in flyteplugins/go/tasks/plugins/webapi/agent/plugin.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/webapi/agent/plugin.go#L164-L165

Added lines #L164 - L165 were not covered by tests
// TODO: Read the streaming output from the agent, and merge it into the final output.
// For now, Propeller assumes that the output is always in the header.
resource := in.GetHeader().GetResource()
Expand Down

0 comments on commit e3fe962

Please sign in to comment.