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

test: update node termination test to model eventual removal #1320

Merged

Conversation

jmdeal
Copy link
Member

@jmdeal jmdeal commented Jun 14, 2024

Fixes #N/A

Description
Updates the node/termination test suite to properly model eventual removal now that it may take multiple reconciliations.

How was this change tested?
make test

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 14, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 14, 2024
@jmdeal jmdeal force-pushed the test/node-termination-with-nc branch from 30d0bd5 to 4f99585 Compare June 14, 2024 05:38
@jmdeal jmdeal changed the title [WIP] test: update node termination test to model eventual removal test: update node termination test to model eventual removal Jun 14, 2024
@jmdeal jmdeal marked this pull request as ready for review June 14, 2024 05:39
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 14, 2024
@k8s-ci-robot k8s-ci-robot requested a review from engedaam June 14, 2024 05:39
@jmdeal jmdeal force-pushed the test/node-termination-with-nc branch 2 times, most recently from 4c03cb7 to 0c4d9d3 Compare June 14, 2024 18:55
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9521007078

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage remained the same at 81.267%

Files with Coverage Reduction New Missed Lines %
pkg/test/expectations/expectations.go 2 93.69%
Totals Coverage Status
Change from base Build 9492890501: 0.0%
Covered Lines: 8299
Relevant Lines: 10212

💛 - Coveralls

@jonathan-innis
Copy link
Member

Can you talk with @jigisha620 on this one? I'm surprised that the changes that were made in the other PR didn't cause failures in these tests and we're having to make these changes after the fact now.

Can you clarify what is failing that wasn't properly captured through testing?

@jmdeal
Copy link
Member Author

jmdeal commented Jun 14, 2024

Already spoke with her offline about it, the gist of the problem is that the node termination controller can now take multiple reconciliations to delete the node. It didn't before because there was never a nodeclaim associated with the node, so it immediately deleted. IMO since it can now take multiple reconciliations this is the correct way to model it and unblocks some issues upon rebase in #916 since it applied the nodeclaim.

@jigisha620
Copy link
Contributor

Can you clarify what is failing that wasn't properly captured through testing?

There wasn't a nodeClaim associated with a node in the tests that we had and that's why there was no failure. This wasn't captured until #916 applied nodeClaim and started seeing the failures.

Copy link
Contributor

@jigisha620 jigisha620 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@jmdeal jmdeal force-pushed the test/node-termination-with-nc branch from 0c4d9d3 to 4759864 Compare June 14, 2024 21:54
@coveralls
Copy link

coveralls commented Jun 14, 2024

Pull Request Test Coverage Report for Build 9522800263

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.09%) to 81.355%

Files with Coverage Reduction New Missed Lines %
pkg/controllers/disruption/drift.go 2 89.29%
Totals Coverage Status
Change from base Build 9492890501: 0.09%
Covered Lines: 8308
Relevant Lines: 10212

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 15, 2024

Pull Request Test Coverage Report for Build 9523915252

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 81.375%

Totals Coverage Status
Change from base Build 9492890501: 0.1%
Covered Lines: 8310
Relevant Lines: 10212

💛 - Coveralls

Copy link
Member

@jonathan-innis jonathan-innis left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jigisha620, jmdeal, jonathan-innis

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 Jun 15, 2024
@coveralls
Copy link

coveralls commented Jun 15, 2024

Pull Request Test Coverage Report for Build 9523995887

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 81.336%

Files with Coverage Reduction New Missed Lines %
pkg/test/expectations/expectations.go 2 93.69%
Totals Coverage Status
Change from base Build 9492890501: 0.07%
Covered Lines: 8306
Relevant Lines: 10212

💛 - Coveralls

@k8s-ci-robot k8s-ci-robot merged commit c51bcd7 into kubernetes-sigs:main Jun 15, 2024
13 checks passed
@coveralls
Copy link

coveralls commented Jun 15, 2024

Pull Request Test Coverage Report for Build 9524005690

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.09%) to 81.355%

Files with Coverage Reduction New Missed Lines %
pkg/controllers/provisioning/scheduling/nodeclaim.go 2 89.13%
Totals Coverage Status
Change from base Build 9492890501: 0.09%
Covered Lines: 8308
Relevant Lines: 10212

💛 - Coveralls

@jmdeal jmdeal deleted the test/node-termination-with-nc branch August 14, 2024 22:55
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

5 participants