Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into real-time-deck-support
Browse files Browse the repository at this point in the history
  • Loading branch information
pingsutw authored Jun 29, 2023
2 parents 96e958e + efb69c3 commit 4e0adf1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst

FROM --platform=${BUILDPLATFORM} golang:1.18-alpine3.16 as builder
FROM --platform=${BUILDPLATFORM} golang:1.19-alpine3.16 as builder

ARG TARGETARCH
ENV GOARCH "${TARGETARCH}"
Expand Down
17 changes: 9 additions & 8 deletions pkg/controller/nodes/subworkflow/launchplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ func (l *launchPlanHandler) StartLaunchPlan(ctx context.Context, nCtx handler.No
}

launchCtx := launchplan.LaunchContext{
ParentNodeExecution: parentNodeExecutionID,
MaxParallelism: nCtx.ExecutionContext().GetExecutionConfig().MaxParallelism,
SecurityContext: nCtx.ExecutionContext().GetSecurityContext(),
RawOutputDataConfig: nCtx.ExecutionContext().GetRawOutputDataConfig().RawOutputDataConfig,
Labels: nCtx.ExecutionContext().GetLabels(),
Annotations: nCtx.ExecutionContext().GetAnnotations(),
Interruptible: nCtx.ExecutionContext().GetExecutionConfig().Interruptible,
OverwriteCache: nCtx.ExecutionContext().GetExecutionConfig().OverwriteCache,
ParentNodeExecution: parentNodeExecutionID,
MaxParallelism: nCtx.ExecutionContext().GetExecutionConfig().MaxParallelism,
SecurityContext: nCtx.ExecutionContext().GetSecurityContext(),
RawOutputDataConfig: nCtx.ExecutionContext().GetRawOutputDataConfig().RawOutputDataConfig,
Labels: nCtx.ExecutionContext().GetLabels(),
Annotations: nCtx.ExecutionContext().GetAnnotations(),
Interruptible: nCtx.ExecutionContext().GetExecutionConfig().Interruptible,
OverwriteCache: nCtx.ExecutionContext().GetExecutionConfig().OverwriteCache,
EnvironmentVariables: nCtx.ExecutionContext().GetExecutionConfig().EnvironmentVariables,
}

if nCtx.ExecutionContext().GetExecutionConfig().RecoveryExecution.WorkflowExecutionIdentifier != nil {
Expand Down
9 changes: 9 additions & 0 deletions pkg/controller/nodes/subworkflow/launchplan/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ func (a *adminLaunchPlanExecutor) Launch(ctx context.Context, launchCtx LaunchCo
}
}

environmentVariables := make([]*core.KeyValuePair, 0, len(launchCtx.EnvironmentVariables))
for k, v := range launchCtx.EnvironmentVariables {
environmentVariables = append(environmentVariables, &core.KeyValuePair{
Key: k,
Value: v,
})
}

req := &admin.ExecutionCreateRequest{
Project: executionID.Project,
Domain: executionID.Domain,
Expand All @@ -122,6 +130,7 @@ func (a *adminLaunchPlanExecutor) Launch(ctx context.Context, launchCtx LaunchCo
RawOutputDataConfig: launchCtx.RawOutputDataConfig,
Interruptible: interruptible,
OverwriteCache: launchCtx.OverwriteCache,
Envs: &admin.Envs{Values: environmentVariables},
},
}

Expand Down
11 changes: 6 additions & 5 deletions pkg/controller/nodes/subworkflow/launchplan/launchplan.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ type LaunchContext struct {
// MaxParallelism
MaxParallelism uint32
// RawOutputDataConfig
RawOutputDataConfig *admin.RawOutputDataConfig
Annotations map[string]string
Labels map[string]string
Interruptible *bool
OverwriteCache bool
RawOutputDataConfig *admin.RawOutputDataConfig
Annotations map[string]string
Labels map[string]string
Interruptible *bool
OverwriteCache bool
EnvironmentVariables map[string]string
}

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

0 comments on commit 4e0adf1

Please sign in to comment.