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

fix: No rows for rest config in case of Default namespace #4269

Merged
merged 1 commit into from
Nov 22, 2023
Merged
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
9 changes: 5 additions & 4 deletions pkg/pipeline/CiHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1640,23 +1640,24 @@ func (impl *CiHandlerImpl) UpdateCiWorkflowStatusFailure(timeoutForFailureCiBuil
for _, ciWorkflow := range ciWorkflows {
var isExt bool
var env *repository3.Environment
var restConfig *rest.Config
if ciWorkflow.Namespace != DefaultCiWorkflowNamespace {
isExt = true
env, err = impl.envRepository.FindById(ciWorkflow.EnvironmentId)
if err != nil {
impl.Logger.Errorw("could not fetch stage env", "err", err)
return err
}
restConfig, err = impl.getRestConfig(ciWorkflow)
if err != nil {
return err
}
}

isEligibleToMarkFailed := false
isPodDeleted := false
if time.Since(ciWorkflow.StartedOn) > (time.Minute * time.Duration(timeoutForFailureCiBuild)) {

restConfig, err := impl.getRestConfig(ciWorkflow)
if err != nil {
return err
}
//check weather pod is exists or not, if exits check its status
wf, err := impl.workflowService.GetWorkflowStatus(ciWorkflow.ExecutorType, ciWorkflow.Name, ciWorkflow.Namespace, restConfig)
if err != nil {
Expand Down
Loading