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 housekeeping/remove-barrier-tick
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Rammer <[email protected]>
  • Loading branch information
hamersaw committed Apr 12, 2023
2 parents 858978e + 2be01e2 commit 58d9648
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 39 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ include boilerplate/flyte/docker_build/Makefile
include boilerplate/flyte/golang_test_targets/Makefile
include boilerplate/flyte/end2end/Makefile


.PHONY: update_boilerplate
update_boilerplate:
@curl https://raw.githubusercontent.com/flyteorg/boilerplate/master/boilerplate/update.sh -o boilerplate/update.sh
@boilerplate/update.sh

.PHONY: linux_compile
linux_compile: export CGO_ENABLED = 0
linux_compile: export GOOS = linux
linux_compile:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flytepropeller ./cmd/controller/main.go
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/flytepropeller-manager ./cmd/manager/main.go
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o /artifacts/kubectl-flyte ./cmd/kubectl-flyte/main.go
go build -o /artifacts/flytepropeller ./cmd/controller/main.go
go build -o /artifacts/flytepropeller-manager ./cmd/manager/main.go
go build -o /artifacts/kubectl-flyte ./cmd/kubectl-flyte/main.go

.PHONY: compile
compile:
Expand All @@ -25,9 +26,9 @@ compile:
cross_compile:
@glide install
@mkdir -p ./bin/cross
GOOS=linux GOARCH=amd64 go build -o bin/cross/flytepropeller ./cmd/controller/main.go
GOOS=linux GOARCH=amd64 go build -o bin/cross/flytepropeller-manager ./cmd/manager/main.go
GOOS=linux GOARCH=amd64 go build -o bin/cross/kubectl-flyte ./cmd/kubectl-flyte/main.go
go build -o bin/cross/flytepropeller ./cmd/controller/main.go
go build -o bin/cross/flytepropeller-manager ./cmd/manager/main.go
go build -o bin/cross/kubectl-flyte ./cmd/kubectl-flyte/main.go

op_code_generate:
@RESOURCE_NAME=flyteworkflow OPERATOR_PKG=github.com/flyteorg/flytepropeller ./hack/update-codegen.sh
Expand All @@ -53,4 +54,3 @@ clean:
golden:
go test ./cmd/kubectl-flyte/cmd -update
go test ./pkg/compiler/test -update

2 changes: 0 additions & 2 deletions pkg/compiler/transformers/k8s/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ func buildNodeSpec(n *core.Node, tasks []*core.CompiledTask, errs errors.Compile

if n.GetTaskNode().Overrides != nil && n.GetTaskNode().Overrides.Resources != nil {
resources = n.GetTaskNode().Overrides.Resources
} else {
resources = getResources(task)
}
}

Expand Down
16 changes: 0 additions & 16 deletions pkg/compiler/transformers/k8s/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,6 @@ func TestBuildNodeSpec(t *testing.T) {
mustBuild(t, n, 1, errs.NewScope())
})

t.Run("Task with resources", func(t *testing.T) {
expectedCPU := resource.MustParse("10Mi")
n.Node.Target = &core.Node_TaskNode{
TaskNode: &core.TaskNode{
Reference: &core.TaskNode_ReferenceId{
ReferenceId: &core.Identifier{Name: "ref_2"},
},
},
}

spec := mustBuild(t, n, 1, errs.NewScope())
assert.NotNil(t, spec.Resources)
assert.NotNil(t, spec.Resources.Requests.Cpu())
assert.Equal(t, expectedCPU.Value(), spec.Resources.Requests.Cpu().Value())
})

t.Run("node with resource overrides", func(t *testing.T) {
expectedCPU := resource.MustParse("20Mi")
n.Node.Target = &core.Node_TaskNode{
Expand Down
12 changes: 0 additions & 12 deletions pkg/compiler/transformers/k8s/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ func computeDeadline(n *core.Node) (*v1.Duration, error) {
return deadline, nil
}

func getResources(task *core.TaskTemplate) *core.Resources {
if task == nil {
return nil
}

if task.GetContainer() == nil {
return nil
}

return task.GetContainer().Resources
}

func toAliasValueArray(aliases []*core.Alias) []v1alpha1.Alias {
if aliases == nil {
return nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/nodes/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (c *nodeExecutor) attemptRecovery(ctx context.Context, nCtx handler.NodeExe
// A recoverable node execution should always be in a terminal phase
switch recovered.Closure.Phase {
case core.NodeExecution_SKIPPED:
return handler.PhaseInfoSkip(nil, "node execution recovery indicated original node was skipped"), nil
return handler.PhaseInfoUndefined, nil
case core.NodeExecution_SUCCEEDED:
fallthrough
case core.NodeExecution_RECOVERED:
Expand Down

0 comments on commit 58d9648

Please sign in to comment.