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

[wip] Enable local e2e testing using aks cluster #5362

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nawazkh
Copy link
Member

@nawazkh nawazkh commented Jan 8, 2025

What type of PR is this?
/kind feature

What this PR does / why we need it:

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:

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests
  • cherry-pick candidate

Release note:

local e2e testing using aks cluster 

@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 release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. 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 Jan 8, 2025
@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 nawazkh. For more information see the 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 8, 2025
Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.43%. Comparing base (c10397e) to head (ad5a022).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5362   +/-   ##
=======================================
  Coverage   52.43%   52.43%           
=======================================
  Files         272      272           
  Lines       29401    29401           
=======================================
+ Hits        15415    15417    +2     
+ Misses      13180    13178    -2     
  Partials      806      806           

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

@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

I was able to get one test run locally

.
.
.
    STEP: PASSED! @ 01/23/25 17:17:53.934
  Jan 23 17:17:53.934: INFO: Cleaning up after "Workload cluster creation Local test: Creating a self-managed VM based cluster using API Server ILB feature gate and fully spec-ed out APIServer ILB template [OPTIONAL][API-Server-ILB] with three controlplane node and three worker nodes" spec
  Jan 23 17:17:53.934: INFO: Dumping all the Cluster API resources in the "capz-e2e-wp84yi" namespace
  STEP: Redacting sensitive information from logs @ 01/23/25 17:18:04.938
  Jan 23 17:18:05.022: WARNING: Redact logs command failed: exit status 1
  INFO: "with three controlplane node and three worker nodes" ran for 14m40s on Ginkgo node 1 of 10 and reported junit test to file /Users/nawazhussain/msftcode/cluster-api-provider-azure/_artifacts/test_e2e_junit.e2e_suite.1.xml
  << Timeline
------------------------------
[SynchronizedAfterSuite] PASSED [0.000 seconds]
[SynchronizedAfterSuite]
/Users/nawazhussain/msftcode/cluster-api-provider-azure/test/e2e/e2e_suite_test.go:123

  Timeline >>
  STEP: Tearing down the management cluster @ 01/23/25 17:18:05.024
  << Timeline
------------------------------
[ReportAfterSuite] PASSED [0.025 seconds]
[ReportAfterSuite] Autogenerated ReportAfterSuite for --junit-report
autogenerated by Ginkgo
------------------------------

Ran 1 of 33 Specs in 1106.852 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 32 Skipped


Ginkgo ran 1 suite in 18m58.0059155s
Test Suite Passed
/Library/Developer/CommandLineTools/usr/bin/make clean-release-git
git restore ./*manager_image_patch.yaml ./*manager_pull_policy.yaml
================ REDACTING LOGS ================
All sensitive variables are redacted

For my reference, the chain of options used to run an e2e test is
GINKGO_FOCUS="Local test: Creating a self-managed VM based cluster using API Server ILB feature gate and fully spec-ed out APIServer ILB template" USE_LOCAL_KIND_REGISTRY=false SKIP_CLEANUP="true" SKIP_LOG_COLLECTION="true" REGISTRY=nhkregistry.azurecr.io MGMT_CLUSTER_TYPE="aks" EXP_APISERVER_ILB=true scripts/ci-e2e.sh

@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

Running e2e tests locally by leveraging APIServerILB solution is going to be tricky with varied types of infra combinations offered by CAPZ.

I plan on enabling local e2e tests in the order below:

  1. Unblock VM based tests.
  2. Unblock VMSS based tests.
  3. Unblock AKS based tests.

Enabling e2e tests should go hand in hand with enabling Tilt development.
As of now, we have two flavors enabling CAPZ development, apiserver-ilb and win-apiserver-ILB.
From, the last test run I realized that it should be fairly easy to unblock any flavor to work with Tilt and local e2e as long as the flavor can leverage APIServerILB solution. So the coming goal would be to add apiserverILB approach to all CAPZ flavors.

@nawazkh
Copy link
Member Author

nawazkh commented Jan 24, 2025

/cc @mboersma @willie-yao @Jont828

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. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants