Skip to content

Commit eefded8

Browse files
limit message length to 250 (#4300)
1 parent b5babb7 commit eefded8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/pipeline/CiHandler.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,11 @@ func (impl *CiHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus
11411141
savedWorkflow.Status = status
11421142
}
11431143
savedWorkflow.PodStatus = podStatus
1144-
savedWorkflow.Message = message
1144+
1145+
// 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
1146+
if len(message) > 250 {
1147+
savedWorkflow.Message = message[:250]
1148+
}
11451149
if savedWorkflow.ExecutorType == pipelineConfig.WORKFLOW_EXECUTOR_TYPE_SYSTEM && savedWorkflow.Status == executors.WorkflowCancel {
11461150
savedWorkflow.PodStatus = "Failed"
11471151
savedWorkflow.Message = TERMINATE_MESSAGE

0 commit comments

Comments
 (0)