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

chore: make load tests more resilient to slow metrics-server startup in GH CI #1634

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

btlghrants
Copy link
Collaborator

Description

Adds some add'l try/catches+output to allow us to see what's actually blowing up in CI.

Related Issue

Fixes #1622

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Checklist before merging

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.40%. Comparing base (36b87fe) to head (f3aafb8).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1634   +/-   ##
=======================================
  Coverage   81.40%   81.40%           
=======================================
  Files          43       43           
  Lines        1979     1979           
  Branches      438      439    +1     
=======================================
  Hits         1611     1611           
+ Misses        366      340   -26     
- Partials        2       28   +26     

see 7 files with indirect coverage changes

@btlghrants
Copy link
Collaborator Author

btlghrants commented Jan 6, 2025

Was able to repro & actually see what's been throwing errors:

image

Suspect this is being caused by the call to kubectl top happening before the kube metrics-server is ready for it:

image

@btlghrants
Copy link
Collaborator Author

btlghrants commented Jan 6, 2025

Seems like we're just trying to call for metrics before the metrics-server is fully ready..? https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/top/top_pod.go#L207

image
image

So... I'm thinking that adding a wait toward the end of the npx ts-node hack/load.cli.ts deploy [...] is probably the way to go here: the definition for a module being "fully deployed" should include having it be available for metrics pulls, IMO.

@btlghrants
Copy link
Collaborator Author

btlghrants commented Jan 6, 2025

Yeah, now that we have some logging output it's easy to see how large a variance there is in the amount of time it takes for GH to get the metric-server ready to serve controller metrics:

image
image

I'll run it the job a few more times to make sure this really solved, but outlook is good.

@btlghrants btlghrants self-assigned this Jan 6, 2025
@btlghrants btlghrants added this to the v0.44.0 milestone Jan 6, 2025
@btlghrants
Copy link
Collaborator Author

Yeah, nothin's bombin'-out anymore so I think I'm going to call this one good & send it for review.

@btlghrants btlghrants marked this pull request as ready for review January 6, 2025 22:05
@btlghrants btlghrants requested a review from a team as a code owner January 6, 2025 22:05
@btlghrants btlghrants changed the title test: add add'l try/catch logging chore: make load tests more resilient to slow metrics-server startup in GH CI Jan 6, 2025
Copy link
Collaborator

@cmwylie19 cmwylie19 left a comment

Choose a reason for hiding this comment

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

lgtm

@cmwylie19 cmwylie19 added this pull request to the merge queue Jan 6, 2025
Merged via the queue into main with commit 568c3d7 Jan 6, 2025
49 checks passed
@cmwylie19 cmwylie19 deleted the 1622_load_test_flaky_in_ci branch January 6, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Load Test is flaky in CI and needs investigation
2 participants