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(controller): Fail workflow when pod is deleted with --force. Fixes #3097 #3469

Merged
merged 1 commit into from Jul 14, 2020

Conversation

alexec
Copy link
Contributor

@alexec alexec commented Jul 14, 2020

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed the CLA.
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

Fixes #3097

This is actually not the original problem in #3097, instead introduced by SignificantPodChange, but only when kubectl delete --force pod ... is used. The informer treats this delete as a update rather than a delete. @jessesuen @alexmt informer weirdness you might want to be aware of.

oldPod, newPod := old.(*apiv1.Pod), new.(*apiv1.Pod)
if oldPod.ResourceVersion == newPod.ResourceVersion {
return
}
if !pod.SignificantPodChange(oldPod, newPod) {
log.WithField("key", key).Info("insignificant pod change")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to be more aware when we ignore changes.

@alexec
Copy link
Contributor Author

alexec commented Jul 14, 2020

This should be back-ported to v2.9

@alexec alexec added this to the v2.9 milestone Jul 14, 2020
@alexec alexec added type/bug type/regression Regression from previous behavior (a specific type of bug) labels Jul 14, 2020
@alexec alexec marked this pull request as ready for review July 14, 2020 15:57
@alexec alexec merged commit aa92ec0 into argoproj:master Jul 14, 2020
@alexec alexec deleted the fix-3097 branch July 14, 2020 16:39
@alexec alexec mentioned this pull request Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent behavior on deleting a running pod in DAG
2 participants