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

Convert TaintBasedEvictions e2e to integration test #81856

Merged
merged 1 commit into from Sep 18, 2019

Conversation

damemi
Copy link
Contributor

@damemi damemi commented Aug 23, 2019

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind cleanup

What this PR does / why we need it:
Rebases and updates the changes from #80817 with the feedback provided in that PR

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 23, 2019
@damemi
Copy link
Contributor Author

damemi commented Aug 23, 2019

@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Aug 23, 2019
@damemi damemi changed the title Ravig fix tbe Convert tbe e2e to integration test Aug 23, 2019
@soltysh
Copy link
Contributor

soltysh commented Aug 26, 2019

/sig scheduling
/kind cleanup
/priority important-longterm
@damemi you're missing bazel update

@k8s-ci-robot k8s-ci-robot added sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed needs-kind Indicates a PR lacks a `kind/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Aug 26, 2019
@damemi
Copy link
Contributor Author

damemi commented Aug 26, 2019

/retest

Copy link
Member

@Huang-Wei Huang-Wei left a comment

Choose a reason for hiding this comment

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

Thanks, @damemi . Some comments below, and for reviewers' conveniences please make changes in a new commit, we can squash later.

test/integration/scheduler/taint_test.go Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
test/integration/scheduler/taint_test.go Outdated Show resolved Hide resolved
@Huang-Wei
Copy link
Member

/assign

@damemi damemi changed the title Convert tbe e2e to integration test Convert TaintBasedEvictions e2e to integration test Sep 11, 2019
@damemi damemi force-pushed the ravig-fix-tbe branch 2 times, most recently from 515b26a to e767790 Compare September 11, 2019 13:56
@damemi
Copy link
Contributor Author

damemi commented Sep 11, 2019

@Huang-Wei with master reopened now, do you have a chance to look at this again? If it looks good I can squash down

test/integration/scheduler/taint_test.go Show resolved Hide resolved
TerminationGracePeriodSeconds: &gracePeriod,
},
}
tolerationSeconds := []int64{200, 300, 0}
Copy link
Member

Choose a reason for hiding this comment

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

How about defining tolerationSeconds in each test struct like

		{
			name:                "Taint based evictions for NodeNotReady and 200 tolerationseconds",
			nodeTaints:          []v1.Taint{{Key: schedulerapi.TaintNodeNotReady, Effect: v1.TaintEffectNoExecute}},
			nodeConditions:      []v1.NodeCondition{{Type: v1.NodeReady, Status: v1.ConditionFalse}},
			pod:                 testPod,
			waitForPodCondition: "updated with tolerationSeconds of 200",
			tolerationSeconds:   200,

for the readability?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TolerationSeconds needs to be a pointer value https://github.com/kubernetes/api/blob/master/core/v1/types.go#L2814

So, we need to declare it in a variable somewhere (can't just do a pointer to an int literal) so we decided this was the way to do it (see #81856 (comment))

@oomichi
Copy link
Member

oomichi commented Sep 11, 2019

/cc @oomichi

@damemi
Copy link
Contributor Author

damemi commented Sep 16, 2019

@Huang-Wei pushed your suggestions in a new commit. If this looks good let me know and I will squash

Copy link
Member

@oomichi oomichi left a comment

Choose a reason for hiding this comment

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

Thanks for updating,

/approve

)
if err != nil {
t.Errorf("Failed to create node controller: %v", err)
return
Copy link
Member

Choose a reason for hiding this comment

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

nit: This return might be unnecessary.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: damemi, oomichi

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 17, 2019
@damemi
Copy link
Contributor Author

damemi commented Sep 18, 2019

Since this has an /approve, I'm going to squash

@Huang-Wei
Copy link
Member

/lgtm

Thanks @damemi for the efforts!

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 18, 2019
@damemi
Copy link
Contributor Author

damemi commented Sep 18, 2019

/retest

@k8s-ci-robot k8s-ci-robot merged commit a54dba0 into kubernetes:master Sep 18, 2019
@k8s-ci-robot k8s-ci-robot added this to the v1.17 milestone Sep 18, 2019
k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.14

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.15

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
k8s-ci-robot added a commit that referenced this pull request Dec 6, 2019
…856-#84036-#84766-#84883-upstream-release-1.16

Automated cherry pick of #81856: Convert tbe e2e to integration test #84036: Ensure TaintBasedEviction int test not rely on #84766: Fix a TaintBasedEviction integration test flake #84883: Update test logic to simulate NodeReady/False and
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. release-note-none Denotes a PR that doesn't merit a release note. sig/scheduling Categorizes an issue or PR as relevant to SIG Scheduling. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants