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

Make watch order conformance test reliable #101950

Merged
merged 1 commit into from May 13, 2021

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented May 12, 2021

What type of PR is this?

/kind bug
/kind failing-test

What this PR does / why we need it:

Fixes #101949

  • Starts the watch order conformance test from a non-zero resourceVersion (required to get consistent ordering in a namespace with multiple watch events already present for configmaps)
  • Handles dropped watches with a retry watcher
Fixes the `should receive events on concurrent watches in same order` conformance test to work properly on clusters that auto-create additional configmaps in namespaces

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 12, 2021
@k8s-ci-robot k8s-ci-robot added area/test sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels May 12, 2021
@dcbw
Copy link
Member

dcbw commented May 12, 2021

/retest

@liggitt
Copy link
Member Author

liggitt commented May 12, 2021

test failure is #101953, unrelated

/retest

case event := <-watch.ResultChan():
case event, ok := <-watch.ResultChan():
if !ok {
framework.Failf("Watch closed unexpectedly")
Copy link
Contributor

Choose a reason for hiding this comment

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

eventually we should change this to be retriable (conformance should pass if watches close) but i won’t make you do that here (i may end up having to do it)

Copy link
Member Author

@liggitt liggitt May 12, 2021

Choose a reason for hiding this comment

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

This is now a retry watcher (watchtools.NewRetryWatcher), so it is already retrying/re-establishing the watch internally... we only get to this point if re-establishing the watch failed. Still possible, but more robust than it was before.

Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@smarterclayton
Copy link
Contributor

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 12, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, smarterclayton

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

@liggitt
Copy link
Member Author

liggitt commented May 12, 2021

/priority important-soon
/triage accepted

@k8s-ci-robot k8s-ci-robot added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 12, 2021
@fejta-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit e6e6536 into kubernetes:master May 13, 2021
@liggitt
Copy link
Member Author

liggitt commented May 13, 2021

opened picks to 1.19, 1.20, 1.21

k8s-ci-robot added a commit that referenced this pull request May 18, 2021
…950-upstream-release-1.21

Automated cherry pick of #101950: Make watch order conformance test reliable
k8s-ci-robot added a commit that referenced this pull request May 18, 2021
…950-upstream-release-1.20

Automated cherry pick of #101950: Make watch order conformance test reliable
k8s-ci-robot added a commit that referenced this pull request May 18, 2021
…950-upstream-release-1.19

Automated cherry pick of #101950: Make watch order conformance test reliable
@liggitt liggitt deleted the watch-order branch May 20, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"should receive events on concurrent watches in same order" conformance test is unreliable
6 participants