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

Fix Custom Resource pagination hang #547

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

jacobtomlinson
Copy link
Member

Follow on to #523 to close #544.

In #544 we are observing a hang when listing custom resources. It appears that built in resources omit the continue metadata parameter when reaching the end of the list, so we were testing for that to decide when to finish paging. However for custom resoureces it still includes the continue paratmeter but just returns an empty string. This was resulting in us paging forever.

This PR extends the check to ensure the continue parameter contains a value. I've also added come fixtures to make it easier to create and test custom resources in the future.

@jacobtomlinson jacobtomlinson added the bug Something isn't working label Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.

Project coverage is 95.02%. Comparing base (87063fc) to head (5b41676).
Report is 156 commits behind head on main.

Files with missing lines Patch % Lines
kr8s/tests/test_api.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #547      +/-   ##
==========================================
+ Coverage   94.61%   95.02%   +0.40%     
==========================================
  Files          29       30       +1     
  Lines        3141     4084     +943     
==========================================
+ Hits         2972     3881     +909     
- Misses        169      203      +34     

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

@jacobtomlinson jacobtomlinson merged commit 8b2466c into kr8s-org:main Jan 7, 2025
13 checks passed
@jacobtomlinson jacobtomlinson deleted the fix-crd-paging branch January 7, 2025 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kr8s tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.19.0 Object API inexplicably hangs
1 participant