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 26c1869 + ca7fe31 commit c8d215c
Show file tree
Hide file tree
Showing 46 changed files with 513 additions and 387 deletions.
211 changes: 119 additions & 92 deletions Gopkg.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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 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)
}

10 changes: 3 additions & 7 deletions go/tasks/pluginmachinery/catalog/mocks/async_client.go

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

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

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

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

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

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

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

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

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

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

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

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

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

8 changes: 3 additions & 5 deletions go/tasks/pluginmachinery/core/mocks/kube_client.go

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

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

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

41 changes: 35 additions & 6 deletions go/tasks/pluginmachinery/core/mocks/resource_manager.go

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

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

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

6 changes: 2 additions & 4 deletions go/tasks/pluginmachinery/core/mocks/secret_manager.go

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

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

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

15 changes: 5 additions & 10 deletions go/tasks/pluginmachinery/core/mocks/task_execution_context.go

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

6 changes: 2 additions & 4 deletions go/tasks/pluginmachinery/core/mocks/task_execution_id.go

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

12 changes: 4 additions & 8 deletions go/tasks/pluginmachinery/core/mocks/task_execution_metadata.go

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

6 changes: 2 additions & 4 deletions go/tasks/pluginmachinery/core/mocks/task_overrides.go

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

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

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

1 change: 1 addition & 0 deletions go/tasks/pluginmachinery/core/resource_manager.go
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
}
4 changes: 2 additions & 2 deletions go/tasks/pluginmachinery/flytek8s/config/config.go
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
6 changes: 2 additions & 4 deletions go/tasks/pluginmachinery/io/mocks/input_file_paths.go

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

12 changes: 4 additions & 8 deletions 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 c8d215c

Please sign in to comment.