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: don't restart hook pod after execute error #1709

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

narasux
Copy link
Collaborator

@narasux narasux commented Nov 6, 2024

存在的问题:Pod 在失败超时/执行超时后被调和循环删除,之后又会被触发,重新创建再来一次

目前的修改策略:Pod 失败 / 超时后,直接终止本次部署(与前端保持一致),过多的失败 Pod 由 hook pod 回收机制清理(在几次部署后清理掉)

@narasux narasux requested review from piglei and jamesgetx and removed request for piglei November 6, 2024 08:49
return r.Result.WithError(errors.WithStack(hookres.ErrExecuteTimeout))
}
return r.Result.WithError(errors.WithStack(hookres.ErrExecuteTimeout))
// Pod 执行超时之后,终止调和循环
Copy link
Collaborator

@jamesgetx jamesgetx Nov 7, 2024

Choose a reason for hiding this comment

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

func (r *DeployActionReconciler) Reconcile 有一段调和代码 。需要判断下影响

// If this is not the initial deploy action, check if there is any preceding running hooks,
	// wait for these hooks by return an error to delay for another reconcile cycle.
	//
	// If hook already turned off, validateNoRunningHooks should not execute (disregarding previous hooks).
	if bkapp.Spec.Hooks != nil && bkapp.Status.DeployId != "" {
		if err = r.validateNoRunningHooks(ctx, bkapp); err != nil {
			return r.Result.WithError(err)
		}
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants