Skip to content

Commit

Permalink
Revert "Support caching subworkflows and launchplans (#50)" (#89)
Browse files Browse the repository at this point in the history
* Revert "Support caching subworkflows and launchplans (#50)"

This reverts commit 8ee9ae0.

* idl generate

Signed-off-by: Daniel Rammer <[email protected]>

---------

Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw authored Feb 22, 2024
1 parent 69ef995 commit 785f31e
Show file tree
Hide file tree
Showing 34 changed files with 68 additions and 1,289 deletions.
19 changes: 4 additions & 15 deletions flyteadmin/pkg/workflowengine/impl/interface_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,32 @@ import (
type InterfaceProvider = common.InterfaceProvider

type LaunchPlanInterfaceProvider struct {
identifier *core.Identifier
expectedInputs core.ParameterMap
fixedInputs core.LiteralMap
expectedOutputs core.VariableMap
identifier *core.Identifier
}

func (p *LaunchPlanInterfaceProvider) GetID() *core.Identifier {
return p.identifier
}

func (p *LaunchPlanInterfaceProvider) GetExpectedInputs() *core.ParameterMap {
return &p.expectedInputs
}

func (p *LaunchPlanInterfaceProvider) GetFixedInputs() *core.LiteralMap {
return &p.fixedInputs
}

func (p *LaunchPlanInterfaceProvider) GetExpectedOutputs() *core.VariableMap {
return &p.expectedOutputs
}

func NewLaunchPlanInterfaceProvider(launchPlan models.LaunchPlan, identifier core.Identifier) (common.InterfaceProvider, error) {
var closure admin.LaunchPlanClosure
if err := proto.Unmarshal(launchPlan.Closure, &closure); err != nil {
logger.Errorf(context.TODO(), "Failed to transform launch plan: %v", err)
return &LaunchPlanInterfaceProvider{}, err
}
var spec admin.LaunchPlanSpec
if err := proto.Unmarshal(launchPlan.Spec, &spec); err != nil {
err := proto.Unmarshal(launchPlan.Closure, &closure)
if err != nil {
logger.Errorf(context.TODO(), "Failed to transform launch plan: %v", err)
return &LaunchPlanInterfaceProvider{}, err
}
return &LaunchPlanInterfaceProvider{
identifier: &identifier,
expectedInputs: *closure.ExpectedInputs,
fixedInputs: *spec.FixedInputs,
expectedOutputs: *closure.ExpectedOutputs,
identifier: &identifier,
}, nil
}
13 changes: 0 additions & 13 deletions flytepropeller/pkg/apis/flyteworkflow/v1alpha1/iface.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,6 @@ type ExecutableNode interface {
GetActiveDeadline() *time.Duration
IsInterruptible() *bool
GetName() string
IsCacheable() *bool
GetCacheVersion() *string
IsCacheSerializable() *bool
}

// ExecutableWorkflowStatus is an interface for the Workflow p. This is the mutable portion for a Workflow
Expand Down Expand Up @@ -494,15 +491,6 @@ type ExecutableSubWorkflow interface {
GetConnections() *Connections
GetOutputs() *OutputVarMap
GetOnFailurePolicy() WorkflowOnFailurePolicy
GetIdentifier() *core.Identifier
GetInterface() *core.TypedInterface
}

// ExecutableLaunchPlan interface captures the methods available on any launch plan.
type ExecutableLaunchPlan interface {
GetId() *core.Identifier
GetInterface() *core.TypedInterface
GetFixedInputs() *core.LiteralMap
}

// Meta provides an interface to retrieve labels, annotations and other concepts that are declared only once
Expand Down Expand Up @@ -530,7 +518,6 @@ type TaskDetailsGetter interface {

type SubWorkflowGetter interface {
FindSubWorkflow(subID WorkflowID) ExecutableSubWorkflow
FindLaunchPlan(id LaunchPlanRefID) ExecutableLaunchPlan
}

type MetaExtended interface {
Expand Down

This file was deleted.

102 changes: 0 additions & 102 deletions flytepropeller/pkg/apis/flyteworkflow/v1alpha1/mocks/ExecutableNode.go

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

Loading

0 comments on commit 785f31e

Please sign in to comment.