Skip to content

test: deflake NodeClaim and presubmit tests #2240

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

Merged
merged 3 commits into from
May 22, 2025

Conversation

rschalo
Copy link
Contributor

@rschalo rschalo commented May 21, 2025

Fixes #N/A

Description
The presubmit test was calling cluster.Nodes() which returns nodes based on a map. This adds a sort so the nodes are deterministically selected for churn.

Deflakes registration by adding time since it can take longer than 1 minute to move from TTL to deletion completing:

     {"level":"DEBUG","time":"2025-05-21T19:04:08.017Z","logger":"controller","caller":"lifecycle/liveness.go:69","message":"terminating due to registration ttl","commit":"91d8ecc","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"fighterribbon-23-rfpvpgytno"},"namespace":"","name":"fighterribbon-23-rfpvpgytno","reconcileID":"ea4d5c90-7f46-4f6b-80d6-3e3d38602624","provider-id":"aws:///us-east-2b/i-0349b1aa449d49a2d","ttl":"15m0s"}
    {"level":"INFO","time":"2025-05-21T19:05:25.282Z","logger":"controller","caller":"lifecycle/controller.go:242","message":"deleted nodeclaim","commit":"91d8ecc","controller":"nodeclaim.lifecycle","controllerGroup":"karpenter.sh","controllerKind":"NodeClaim","NodeClaim":{"name":"fighterribbon-23-rfpvpgytno"},"namespace":"","name":"fighterribbon-23-rfpvpgytno","reconcileID":"9be9e594-65de-45de-a195-10b54561cf8b","provider-id":"aws:///us-east-2b/i-0349b1aa449d49a2d"}

Also fixes a case where the old test providerID failed the regex. Having no providerID accomplishes the desired garbage collection behavior.

How was this change tested?
make upstream-e2etests

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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 21, 2025
@k8s-ci-robot k8s-ci-robot requested review from engedaam and tallaxes May 21, 2025 23:28
@rschalo rschalo changed the title test: deflake tests test: deflake nodeclaim tests May 21, 2025
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label May 21, 2025
Copy link
Contributor

@engedaam engedaam left a comment

Choose a reason for hiding this comment

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

/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 21, 2025
@coveralls
Copy link

coveralls commented May 21, 2025

Pull Request Test Coverage Report for Build 15192600380

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.008%) to 81.975%

Files with Coverage Reduction New Missed Lines %
pkg/controllers/provisioning/scheduling/nodeclaim.go 3 89.66%
Totals Coverage Status
Change from base Build 15175060207: -0.008%
Covered Lines: 10178
Relevant Lines: 12416

💛 - Coveralls

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 22, 2025
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels May 22, 2025
@rschalo rschalo changed the title test: deflake nodeclaim tests test: deflake NodeClaim and presubmit tests May 22, 2025
@rschalo
Copy link
Contributor Author

rschalo commented May 22, 2025

/test ?

@k8s-ci-robot
Copy link
Contributor

@rschalo: The following commands are available to trigger optional jobs:

/test pull-karpenter-test-1-26
/test pull-karpenter-test-1-27
/test pull-karpenter-test-1-28
/test pull-karpenter-test-1-29

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rschalo
Copy link
Contributor Author

rschalo commented May 22, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label May 22, 2025
@rschalo
Copy link
Contributor Author

rschalo commented May 22, 2025

/retest

@rschalo
Copy link
Contributor Author

rschalo commented May 22, 2025

/test pull-karpenter-test-1-27

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 May 22, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: engedaam, jonathan-innis, rschalo

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 May 22, 2025
@k8s-ci-robot k8s-ci-robot merged commit 9aec722 into kubernetes-sigs:main May 22, 2025
26 of 27 checks passed
@flavono123
Copy link
Contributor

may i retest what i submitted already which are failed for "does not delete nodes with pod churn, deletes nodes without pod churn", or should i?

#2090 #2054

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants