Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

Commit 51eda24

Browse files
Future-OutlierFuture Outlier
andauthored
Add supportTaskTypes for agentservice without write it in config twice. (#612)
* Add supportTaskTypes for agent service Signed-off-by: Future Outlier <eric901201@gmai.com> * uppdate flyteplugins module version Signed-off-by: Future Outlier <eric901201@gmai.com> --------- Signed-off-by: Future Outlier <eric901201@gmai.com> Signed-off-by: Future-Outlier <eric901201@gmail.com> Co-authored-by: Future Outlier <eric901201@gmai.com>
1 parent 6b1d11c commit 51eda24

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1
88
github.com/fatih/color v1.13.0
99
github.com/flyteorg/flyteidl v1.5.13
10-
github.com/flyteorg/flyteplugins v1.1.28
10+
github.com/flyteorg/flyteplugins v1.1.29
1111
github.com/flyteorg/flytestdlib v1.0.24
1212
github.com/ghodss/yaml v1.0.0
1313
github.com/go-redis/redis v6.15.7+incompatible

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF
244244
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
245245
github.com/flyteorg/flyteidl v1.5.13 h1:IQ2Cw+u36ew3BPyRDAcHdzc/GyNEOXOxhKy9jbS4hbo=
246246
github.com/flyteorg/flyteidl v1.5.13/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og=
247-
github.com/flyteorg/flyteplugins v1.1.28 h1:vf0Qzxkh9xezF/DrXIQW92lSnjreGIiBfGyBVmDpBXQ=
248-
github.com/flyteorg/flyteplugins v1.1.28/go.mod h1:FujFQdL/f9r1HvFR81JCiNYusDy9F0lExhyoyMHXXbg=
247+
github.com/flyteorg/flyteplugins v1.1.29 h1:75I045EgfwNcyYzDhNwWye80+nyMmWmiEW3G+kOvOxc=
248+
github.com/flyteorg/flyteplugins v1.1.29/go.mod h1:FujFQdL/f9r1HvFR81JCiNYusDy9F0lExhyoyMHXXbg=
249249
github.com/flyteorg/flytestdlib v1.0.24 h1:jDvymcjlsTRCwOtxPapro0WZBe3isTz+T3Tiq+mZUuk=
250250
github.com/flyteorg/flytestdlib v1.0.24/go.mod h1:6nXa5g00qFIsgdvQ7jKQMJmDniqO0hG6Z5X5olfduqQ=
251251
github.com/flyteorg/stow v0.3.7 h1:Cx7j8/Ux6+toD5hp5fy++927V+yAcAttDeQAlUD/864=

pkg/controller/nodes/task/plugin_config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
"github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/k8s"
1717
)
1818

19+
const AgentServiceKey = "agent-service"
20+
1921
var once sync.Once
2022

2123
func WranglePluginsAndGenerateFinalList(ctx context.Context, cfg *config.TaskPluginConfig, pr PluginRegistryIface) (enabledPlugins []core.PluginEntry, defaultForTaskTypes map[pluginID][]taskType, err error) {
@@ -24,8 +26,9 @@ func WranglePluginsAndGenerateFinalList(ctx context.Context, cfg *config.TaskPlu
2426
}
2527

2628
// Register the GRPC plugin after the config is loaded
27-
once.Do(func() { agent.RegisterAgentPlugin() })
2829
pluginsConfigMeta, err := cfg.GetEnabledPlugins()
30+
once.Do(func() { agent.RegisterAgentPlugin(pluginsConfigMeta.AllDefaultForTaskTypes[AgentServiceKey]) })
31+
2932
if err != nil {
3033
return nil, nil, err
3134
}

0 commit comments

Comments
 (0)