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

Agent ClientSet #4718

Merged
merged 13 commits into from
Jan 31, 2024
Prev Previous commit
Next Next commit
improve error message
Signed-off-by: Future-Outlier <[email protected]>
Future-Outlier committed Jan 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0cbfd41488bdb14de0f45e6cf37a5ffe98215d6b
4 changes: 4 additions & 0 deletions flyteplugins/go/tasks/plugins/webapi/agent/plugin.go
Original file line number Diff line number Diff line change
@@ -83,6 +83,10 @@ func (p Plugin) Create(ctx context.Context, taskCtx webapi.TaskExecutionContextR
agent := getFinalAgent(taskTemplate.Type, p.cfg, p.agentRegistry)

client := p.cs.agentClients[agent.Endpoint]
if client == nil {
return nil, nil, fmt.Errorf("agent:[%v] is not connected, please check if the agent is up and running", agent)
}

finalCtx, cancel := getFinalContext(ctx, "CreateTask", agent)
defer cancel()