diff --git a/go.mod b/go.mod index 118f6e4fd..0727e71a8 100644 --- a/go.mod +++ b/go.mod @@ -6,8 +6,8 @@ require ( github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295 github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1 github.com/fatih/color v1.13.0 - github.com/flyteorg/flyteidl v1.5.2 - github.com/flyteorg/flyteplugins v1.0.63 + github.com/flyteorg/flyteidl v1.5.10 + github.com/flyteorg/flyteplugins v1.0.64 github.com/flyteorg/flytestdlib v1.0.15 github.com/ghodss/yaml v1.0.0 github.com/go-redis/redis v6.15.7+incompatible diff --git a/go.sum b/go.sum index 98cb6acc6..f172dcae3 100644 --- a/go.sum +++ b/go.sum @@ -260,10 +260,10 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/flyteorg/flyteidl v1.5.2 h1:DZPzYkTg92qA4e17fd0ZW1M+gh1gJKh/VOK+F4bYgM8= -github.com/flyteorg/flyteidl v1.5.2/go.mod h1:ckLjB51moX4L0oQml+WTCrPK50zrJf6IZJ6LPC0RB4I= -github.com/flyteorg/flyteplugins v1.0.63 h1:9qLUWQz+ReDmXpkWRd0F72jRE7wh5U/L4Iu/hsH9iNw= -github.com/flyteorg/flyteplugins v1.0.63/go.mod h1:RUQgydOtY+8dkOdV0orxDdAyAyQT6EIz4qdvHO5h6R8= +github.com/flyteorg/flyteidl v1.5.10 h1:SHeiaWRt8EAVuFsat+BJswtc07HTZ4DqhfTEYSm621k= +github.com/flyteorg/flyteidl v1.5.10/go.mod h1:EtE/muM2lHHgBabjYcxqe9TWeJSL0kXwbI0RgVwI4Og= +github.com/flyteorg/flyteplugins v1.0.64 h1:t9S59C0s2nXsUEqKbQZJYHQzSfkhjJh1dcXlBlxhEUk= +github.com/flyteorg/flyteplugins v1.0.64/go.mod h1:HHt4nKDKVwrZPKDsj99dNtDSIJL378xNotYMA3a/TFA= github.com/flyteorg/flytestdlib v1.0.15 h1:kv9jDQmytbE84caY+pkZN8trJU2ouSAmESzpTEhfTt0= github.com/flyteorg/flytestdlib v1.0.15/go.mod h1:ghw/cjY0sEWIIbyCtcJnL/Gt7ZS7gf9SUi0CCPhbz3s= github.com/flyteorg/stow v0.3.6 h1:jt50ciM14qhKBaIrB+ppXXY+SXB59FNREFgTJqCyqIk= diff --git a/pkg/controller/nodes/task/plugin_config.go b/pkg/controller/nodes/task/plugin_config.go index e6f546219..07f6d3a7a 100644 --- a/pkg/controller/nodes/task/plugin_config.go +++ b/pkg/controller/nodes/task/plugin_config.go @@ -4,21 +4,27 @@ import ( "context" "fmt" "strings" + "sync" "github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/backoff" "github.com/flyteorg/flyteplugins/go/tasks/pluginmachinery/core" "github.com/flyteorg/flytestdlib/logger" + "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/agent" "github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/config" "github.com/flyteorg/flytepropeller/pkg/controller/nodes/task/k8s" ) +var once sync.Once + func WranglePluginsAndGenerateFinalList(ctx context.Context, cfg *config.TaskPluginConfig, pr PluginRegistryIface) (enabledPlugins []core.PluginEntry, defaultForTaskTypes map[pluginID][]taskType, err error) { if cfg == nil { return nil, nil, fmt.Errorf("unable to initialize plugin list, cfg is a required argument") } + // Register the GRPC plugin after the config is loaded + once.Do(func() { agent.RegisterAgentPlugin() }) pluginsConfigMeta, err := cfg.GetEnabledPlugins() if err != nil { return nil, nil, err diff --git a/plugins/loader.go b/plugins/loader.go index 388367ba3..68635dc78 100644 --- a/plugins/loader.go +++ b/plugins/loader.go @@ -17,6 +17,5 @@ import ( _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/athena" _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/bigquery" _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/databricks" - _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/grpc" _ "github.com/flyteorg/flyteplugins/go/tasks/plugins/webapi/snowflake" )