-
Notifications
You must be signed in to change notification settings - Fork 554
feat: wf pod restart #3892
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
feat: wf pod restart #3892
Conversation
pkg/pipeline/CdHandler.go
Outdated
| } | ||
|
|
||
| if retryCnt >= impl.cdConfig.MaxCdWorkflowRunnerRetries { | ||
| impl.Logger.Debugw("maximum retries for this workflow are exhausted, not re-triggering again", "retries", retryCnt, "wfrId", runner.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convert this to Info level msg
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pkg/pipeline/CiHandler.go
Outdated
| clusterConfig, err := cluster.GetClusterBean(*env.Cluster).GetClusterConfig() | ||
| if err != nil { | ||
| impl.Logger.Warnw("error in getting cluster Config", "err", err, "clusterId", env.Cluster.Id) | ||
| continue | ||
| } | ||
|
|
||
| client, err = impl.K8sUtil.GetCoreV1Client(clusterConfig) | ||
| if err != nil { | ||
| impl.Logger.Warnw("error in getting core v1 client using clusterConfig", "err", err, "clusterId", env.Cluster.Id) | ||
| continue | ||
| } | ||
| ns = env.Namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create separate func for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pkg/pipeline/CiHandler.go
Outdated
| if ciWorkflow.Status != WorkflowCancel { | ||
| retryCount, refCiWorkflow, err := impl.getRefWorkflowAndCiRetryCount(ciWorkflow) | ||
| if err != nil { | ||
| impl.Logger.Errorw("error in getRefWorkflowAndCiRetryCount", "ciWorkflowId", ciWorkflow.Id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error not logged here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| func (impl *CdWorkflowRepositoryImpl) FindRetriedWorkflowCountByReferenceId(wfrId int) (int, error) { | ||
| retryCount := 0 | ||
| query := fmt.Sprintf("select count(*) "+ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use id instead of * here
|
Kudos, SonarCloud Quality Gate passed!
|








Description
This feature is to retrigger ci,pre-cd and post-cd workflows incase they get deleted before reaching terminal state.
Fixes #4061
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist:
Does this PR introduce a user-facing change?