Skip to content

Commit

Permalink
Maintaining Interruptible and OverwriteCache for reference launchplans (
Browse files Browse the repository at this point in the history
flyteorg#557)

* maintaining Interruptible and OverwriteCache for reference launchplans

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

* fixed lint issues

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

---------

Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw authored Apr 20, 2023
1 parent 7b0243d commit 0487891
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
2 changes: 2 additions & 0 deletions flytepropeller/pkg/controller/nodes/subworkflow/launchplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ func (l *launchPlanHandler) StartLaunchPlan(ctx context.Context, nCtx handler.No
RawOutputDataConfig: nCtx.ExecutionContext().GetRawOutputDataConfig().RawOutputDataConfig,
Labels: nCtx.ExecutionContext().GetLabels(),
Annotations: nCtx.ExecutionContext().GetAnnotations(),
Interruptible: nCtx.ExecutionContext().GetExecutionConfig().Interruptible,
OverwriteCache: nCtx.ExecutionContext().GetExecutionConfig().OverwriteCache,
}

if nCtx.ExecutionContext().GetExecutionConfig().RecoveryExecution.WorkflowExecutionIdentifier != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@ import (
"fmt"
"time"

evtErr "github.com/flyteorg/flytepropeller/events/errors"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"

"github.com/flyteorg/flytestdlib/cache"
"golang.org/x/time/rate"
"k8s.io/client-go/util/workqueue"

stdErr "github.com/flyteorg/flytestdlib/errors"

"github.com/flyteorg/flytestdlib/logger"

"github.com/flyteorg/flytestdlib/promutils"

"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/admin"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/core"
"github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
evtErr "github.com/flyteorg/flytepropeller/events/errors"

"github.com/golang/protobuf/ptypes/wrappers"

"golang.org/x/time/rate"

"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"k8s.io/client-go/util/workqueue"
)

var isRecovery = true
Expand Down Expand Up @@ -93,6 +95,13 @@ func (a *adminLaunchPlanExecutor) Launch(ctx context.Context, launchCtx LaunchCo
}
}

var interruptible *wrappers.BoolValue
if launchCtx.Interruptible != nil {
interruptible = &wrappers.BoolValue{
Value: *launchCtx.Interruptible,
}
}

req := &admin.ExecutionCreateRequest{
Project: executionID.Project,
Domain: executionID.Domain,
Expand All @@ -111,6 +120,8 @@ func (a *adminLaunchPlanExecutor) Launch(ctx context.Context, launchCtx LaunchCo
SecurityContext: &launchCtx.SecurityContext,
MaxParallelism: int32(launchCtx.MaxParallelism),
RawOutputDataConfig: launchCtx.RawOutputDataConfig,
Interruptible: interruptible,
OverwriteCache: launchCtx.OverwriteCache,
},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type LaunchContext struct {
RawOutputDataConfig *admin.RawOutputDataConfig
Annotations map[string]string
Labels map[string]string
Interruptible *bool
OverwriteCache bool
}

// Executor interface to be implemented by the remote system that can allow workflow launching capabilities
Expand Down

0 comments on commit 0487891

Please sign in to comment.