Skip to content

Commit

Permalink
Merge pull request flyteorg#44 from lyft/simpler-hive-plugin-init
Browse files Browse the repository at this point in the history
Hive plugin: using primary cluster labels to execute queries and manage resource; simplify hive plugin init interface
  • Loading branch information
bnsblue authored Jan 13, 2020
2 parents c64816d + 7bd4a45 commit 88298ee
Show file tree
Hide file tree
Showing 46 changed files with 513 additions and 387 deletions.
211 changes: 119 additions & 92 deletions flyteplugins/Gopkg.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion flyteplugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ update_boilerplate:

generate:
which pflags || (go get github.com/lyft/flytestdlib/cli/pflags)
which mockery || (go install github.com/lyft/flyteidl/vendor/github.com/vektra/mockery/cmd/mockery)
which mockery || (go install github.com/lyft/flyteplugins/vendor/github.com/vektra/mockery/cmd/mockery)
which enumer || (go get github.com/alvaroloes/enumer)
@go generate ./...

Expand Down
1 change: 0 additions & 1 deletion flyteplugins/go/tasks/logs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ func GetLogConfig() *LogConfig {
func SetLogConfig(logConfig *LogConfig) error {
return logConfigSection.SetConfig(logConfig)
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 4 additions & 9 deletions flyteplugins/go/tasks/pluginmachinery/catalog/mocks/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions flyteplugins/go/tasks/pluginmachinery/catalog/mocks/future.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions flyteplugins/go/tasks/pluginmachinery/core/mocks/plugin.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type ResourceRegistrar interface {

// Resource Manager manages a single resource type, and each allocation is of size one
type ResourceManager interface {
GetID() string
AllocateResource(ctx context.Context, namespace ResourceNamespace, allocationToken string) (AllocationStatus, error)
ReleaseResource(ctx context.Context, namespace ResourceNamespace, allocationToken string) error
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config

import (
"k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

"github.com/lyft/flyteplugins/go/tasks/config"
)
Expand Down Expand Up @@ -35,7 +35,7 @@ type K8sPluginConfig struct {
// Provide additional environment variable pairs that plugin authors will provide to containers
DefaultEnvVars map[string]string `json:"default-env-vars" pflag:"-,Additional environment variable that should be injected into every resource"`
// Provide additional environment variable pairs whose values resolve from the plugin's execution environment.
DefaultEnvVarsFromEnv map[string]string `json:"default-env-vars-from-env" pflag:",Additional environment variable that should be injected into every resource"`
DefaultEnvVarsFromEnv map[string]string `json:"default-env-vars-from-env" pflag:"-,Additional environment variable that should be injected into every resource"`
// Tolerations in the cluster that should be applied for a specific resource
// Currently we support simple resource based tolerations only
ResourceTolerations map[v1.ResourceName][]v1.Toleration `json:"resource-tolerations" pflag:"-,Default tolerations to be applied for resource of type 'key'"`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions flyteplugins/go/tasks/pluginmachinery/io/mocks/input_reader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 88298ee

Please sign in to comment.