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

wip:refactor: refactor retry logic of creating pod failed #1342

Closed
wants to merge 2 commits into from

Conversation

zhujian7
Copy link
Collaborator

What this PR does / why we need it:

The old retry logic will make the controller stuck for a long time, delete it.

Which issue(s) this PR is related to (optional, link to 3rd issue(s)):

Fixes #

Reference to #

Special notes for your reviewer:

/cc @your-reviewer

Release note:

NONE

@caicloud-bot caicloud-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. labels Dec 14, 2019
@caicloud-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: zhujian7

Assign the PR to them by writing /assign @zhujian7 in a comment when ready.

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@caicloud-bot caicloud-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 14, 2019
The old logic will make controller stuck for a long time
@zhujian7
Copy link
Collaborator Author

/hold
GC mechanism can only process the latest pod of a stage, the older pods remain in the cluster.

@caicloud-bot caicloud-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 14, 2019
// executed but not succeeded for some retryable reason.
type RetryStatus struct {
// Times records the execution times, e.g. 1 represents the first time to execute.
Times int `json:"times,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think counts is better.

// RetryConfig configures retry times and duration for retrying to execute a stage.
type RetryConfig struct {
// Times of a stage can be totally retried
Times int `json:"times"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fields are not clear, what about:

type RetryConfig struct {
	// Limit defines the max retry times of one stage execution.
	Limit int `json:"limit"`
	// Timeout defines the retry timeout of one stage execution.
	Timeout time.Duration `json:"Timeout"`

@caicloud-bot caicloud-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 23, 2020
@caicloud-bot
Copy link
Collaborator

@zhujian7: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@zhujian7
Copy link
Collaborator Author

zhujian7 commented Dec 3, 2020

#1528 fixed this problem
/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
caicloud-cla: yes Indicates the PR's author has not signed the Caicloud CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants