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: Add testing to verify consistent generation for a no change update #6700

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

engedaam
Copy link
Contributor

@engedaam engedaam commented Aug 11, 2024

Fixes #N/A

Description

  • As part of the conversion webhooks, it is possible to apply the same resource multiple times and have the resource generation increase each time. Adding testing to make sure the resource generation does not increases for applying the same resource multiple times.

How was this change tested?

  • /karpenter snapshot

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

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

@engedaam engedaam requested a review from a team as a code owner August 11, 2024 02:56
Copy link

netlify bot commented Aug 11, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit 6b1e6e3
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/66ba859986ffbc000889f454

@coveralls
Copy link

coveralls commented Aug 11, 2024

Pull Request Test Coverage Report for Build 10359984624

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 79.281%

Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 91.67%
pkg/fake/utils.go 2 94.56%
Totals Coverage Status
Change from base Build 10358539982: -0.04%
Covered Lines: 5996
Relevant Lines: 7563

💛 - Coveralls

Copy link
Contributor Author

@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.

/karpenter snapshot

Copy link
Contributor

Snapshot successfully published to oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter:0-72b86ee271a5137d9212006460ec9d3795b05a42.
To install you must login to the ECR repo with an AWS account:

aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 021119463062.dkr.ecr.us-east-1.amazonaws.com

helm upgrade --install karpenter oci://021119463062.dkr.ecr.us-east-1.amazonaws.com/karpenter/snapshot/karpenter --version "0-72b86ee271a5137d9212006460ec9d3795b05a42" --namespace "kube-system" --create-namespace \
  --set "settings.clusterName=${CLUSTER_NAME}" \
  --set "settings.interruptionQueue=${CLUSTER_NAME}" \
  --set controller.resources.requests.cpu=1 \
  --set controller.resources.requests.memory=1Gi \
  --set controller.resources.limits.cpu=1 \
  --set controller.resources.limits.memory=1Gi \
  --wait

test/suites/integration/conversion_test.go Outdated Show resolved Hide resolved
test/suites/integration/conversion_test.go Outdated Show resolved Hide resolved
@engedaam engedaam force-pushed the add-conversion-testing branch 2 times, most recently from 9fe3ac3 to d117215 Compare August 11, 2024 23:26
jonathan-innis
jonathan-innis previously approved these changes Aug 12, 2024
Copy link
Contributor

@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.

Nice work! One question about ensuring that our testing covers the objects that we receive back from the apiserver too

njtran
njtran previously approved these changes Aug 12, 2024
Copy link
Contributor

@njtran njtran left a comment

Choose a reason for hiding this comment

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

Is there a way to check if the kubelet values are what we expect?

@engedaam engedaam enabled auto-merge (rebase) August 12, 2024 21:51
auto-merge was automatically disabled August 12, 2024 21:51

Rebase failed

@engedaam engedaam enabled auto-merge (squash) August 12, 2024 21:59
@engedaam engedaam merged commit 42007e9 into aws:main Aug 12, 2024
16 checks passed
@engedaam engedaam deleted the add-conversion-testing branch August 26, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants