Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomnewton/dont store messages in crd #1

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions flyteidl/gen/pb-go/flyteidl/core/execution.pb.go

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

26 changes: 13 additions & 13 deletions flytepropeller/pkg/apis/flyteworkflow/v1alpha1/node_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ func (in *DynamicNodeStatus) SetDynamicNodePhase(phase DynamicNodePhase) {
}

func (in *DynamicNodeStatus) SetExecutionError(err *core.ExecutionError) {
if err != nil {
in.Error = &ExecutionError{ExecutionError: err}
} else {
in.Error = nil
}
in.Error = nil
// if err != nil {
// in.Error = &ExecutionError{ExecutionError: err}
// } else {
// }
}

func (in *DynamicNodeStatus) SetIsFailurePermanent(isFailurePermanent bool) {
Expand Down Expand Up @@ -595,25 +595,25 @@ func (in *NodeStatus) GetOrCreateArrayNodeStatus() MutableArrayNodeStatus {
}

func (in *NodeStatus) UpdatePhase(p NodePhase, occurredAt metav1.Time, reason string, err *core.ExecutionError) {
if in.Phase == p && in.Message == reason {
if in.Phase == p {
// We will not update the phase multiple times. This prevents the comparison from returning false positive
return
}

in.Phase = p
in.Message = reason
if len(reason) > maxMessageSize {
in.Message = reason[:maxMessageSize]
}
in.Message = ""
// if len(reason) > maxMessageSize {
// in.Message = reason[:maxMessageSize]
// }

n := occurredAt
if occurredAt.IsZero() {
n = metav1.Now()
}

if err != nil {
in.Error = &ExecutionError{err}
}
// if err != nil {
// in.Error = &ExecutionError{err}
// }

if p == NodePhaseQueued && in.QueuedAt == nil {
in.QueuedAt = &n
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,24 +50,24 @@ func IsWorkflowPhaseTerminal(p WorkflowPhase) bool {
}

func (in *WorkflowStatus) SetMessage(msg string) {
in.Message = msg
in.Message = ""
}

func (in *WorkflowStatus) UpdatePhase(p WorkflowPhase, msg string, err *core.ExecutionError) {
in.Phase = p
in.Message = msg
if len(msg) > maxMessageSize {
in.Message = msg[:maxMessageSize]
}
in.Message = ""
// if len(msg) > maxMessageSize {
// in.Message = msg[:maxMessageSize]
// }

n := metav1.Now()
if in.StartedAt == nil {
in.StartedAt = &n
}

if err != nil {
in.Error = &ExecutionError{err}
}
// if err != nil {
// in.Error = &ExecutionError{err}
// }

if IsWorkflowPhaseTerminal(p) && in.StoppedAt == nil {
in.StoppedAt = &n
Expand Down Expand Up @@ -108,7 +108,7 @@ func (in *WorkflowStatus) IsTerminated() bool {
}

func (in *WorkflowStatus) GetMessage() string {
return in.Message
return ""
}

func (in *WorkflowStatus) GetNodeExecutionStatus(ctx context.Context, id NodeID) ExecutableNodeStatus {
Expand Down

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