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: validate AKS node pool provisioned stability #4124

Closed

Conversation

jackfrancis
Copy link
Contributor

What type of PR is this?

What this PR does / why we need it:

This PR adds a new test to the AKS E2E scenario to validate stability of AzureManagedMachinePool resources after they have come Ready.

Until #4116 is fixed, this new test scenario should cause the AKS E2E scenario to fail.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

  • cherry-pick candidate

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Oct 12, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jackfrancis. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 12, 2023
@nawazkh
Copy link
Member

nawazkh commented Oct 12, 2023

This looks good to me. However, I wonder if we need to add more scenarios on top of this improvement.
(This improvement being tests check after some interval if the resource is truly ready or not)

Improvements like:

  • Create scenarios that trigger resource flapping. Like "set a new Lablel" in our tests.
    • We may already be setting new labels or updating them in the tests, I don't know if we do.
  • Decide upon such resource-flipping fields in our CRDs and add changes to those fields over the course of e2e test.
    • We may be doing that already in our tests, I will check if we are doing so.

Copy link
Contributor

@nojnhuh nojnhuh left a comment

Choose a reason for hiding this comment

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

Going off of what @nawazkh mentioned, ideally we'd do this after every individual state change but that could easily double or triple how long the tests take.

test/e2e/aks.go Outdated
func WaitForAKSMachinePoolsToStabilize(ctx context.Context, input WaitForControlPlaneAndMachinesReadyInput, intervals ...interface{}) {
var specName = "azuremanagedmachinepools-stabilize"
// First we wait for all AzureManagedMachinePools to be in a Ready state
Eventually(func(g Gomega) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the boolean here have any effect?


return false
}, intervals...).Should(Succeed())
// Then we wait for a time to verify that no pool re-enters a non-Ready state
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the big risk here is that it will make the tests flakier, so I wonder if it may be worth building in some threshold. But we could adjust later since I think this is worth getting in.

@codecov
Copy link

codecov bot commented Oct 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (85c23aa) 57.66% compared to head (2ceb709) 57.66%.
Report is 415 commits behind head on main.

❗ Current head 2ceb709 differs from pull request most recent head ca57acf. Consider uploading reports for the commit ca57acf to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4124   +/-   ##
=======================================
  Coverage   57.66%   57.66%           
=======================================
  Files         188      188           
  Lines       19320    19320           
=======================================
  Hits        11140    11140           
  Misses       7548     7548           
  Partials      632      632           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jackfrancis jackfrancis force-pushed the test-aks-stable-pools branch from 2ceb709 to 61ffb6d Compare October 12, 2023 19:32
test/e2e/aks.go Outdated
Comment on lines 239 to 243
for _, pool := range ammpList.Items {
g.Expect(pool.Status.Ready).To(BeFalse())
}

}, e2eConfig.GetIntervals(specName, "wait-machines-provisioned-stability")...).Should(Not(Succeed()))
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having a hard time grokking exactly what this is doing. Could this maybe be expressed a bit more clearly with Consistently instead of Eventually?

@jackfrancis jackfrancis force-pushed the test-aks-stable-pools branch from 61ffb6d to ca57acf Compare October 12, 2023 20:55
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Oct 12, 2023

@jackfrancis: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-test ca57acf link true /test pull-cluster-api-provider-azure-test

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants