Skip to content

Commit

Permalink
limit message length to 250 (#4300)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashish-devtron committed Nov 29, 2023
1 parent b5babb7 commit eefded8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/pipeline/CiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,11 @@ func (impl *CiHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus
savedWorkflow.Status = status
}
savedWorkflow.PodStatus = podStatus
savedWorkflow.Message = message

// NOTE: we are doing this for a quick fix where ci pending message become larger than 250 and in db we had set the charter limit to 250
if len(message) > 250 {
savedWorkflow.Message = message[:250]
}
if savedWorkflow.ExecutorType == pipelineConfig.WORKFLOW_EXECUTOR_TYPE_SYSTEM && savedWorkflow.Status == executors.WorkflowCancel {
savedWorkflow.PodStatus = "Failed"
savedWorkflow.Message = TERMINATE_MESSAGE
Expand Down

0 comments on commit eefded8

Please sign in to comment.