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

Unable to Promote e2e which are using optional Condition fields such as Reason or Message #75324

Open
mgdevstack opened this Issue Mar 13, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@mgdevstack
Copy link
Member

mgdevstack commented Mar 13, 2019

Issue: Many e2e are using optional condition fields such as Reason or Message to verify whether pod is failed or reached to the expected state having known expected reason and message.

These are valid scenarios but we can not promote such e2e to Conformance as these Reasons and Messages may change over a period of time.

This is observed mostly if we are expecting Pods/Jobs to get failed due to certain expected reason and message but failure may have tons of other reasons.

References:

  1. #74979 (comment)
  2. #75018 (review)
  3. err = waitForEventWithReason(f.ClientSet, f.Namespace.Name, cronJob.Name, []string{"MissingJob", "UnexpectedJob"})
  4. https://github.com/kubernetes/kubernetes/blob/master/test/e2e/apps/cronjob.go#L222
  5. if e.InvolvedObject.Kind == "Pod" && e.Reason == "NotTriggerScaleUp" && strings.Contains(e.Message, "it wouldn't fit if a new node is added") {
  6. Expect(init.Reason).To(Equal("ContainersNotInitialized"))
    [Conformance e2e]
  7. Expect(init.Reason).To(Equal("ContainersNotInitialized"))
    [Conformance e2e]
    ........

So how such situations can be taken care while writing e2e?
- verifying status and message against non-empty field would resolve this issue but there would not be preciseness of e2e behavior.

@kubernetes/sig-architecture-misc-use-only-as-a-last-resort
@kubernetes/cncf-conformance-wg

@mgdevstack mgdevstack changed the title Unable to Promote e2e using optional Condition fields such as Reason or Message Unable to Promote e2e which are using optional Condition fields such as Reason or Message Mar 20, 2019

@spiffxp

This comment has been minimized.

Copy link
Member

spiffxp commented Mar 22, 2019

/area conformance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.