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 pod summary for large numbers of pods #1812

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

nebril
Copy link
Member

@nebril nebril commented Jul 7, 2023

This change fixes a bug which caused clusters with more than 500 pods to fail pod summary step.

The code assumed that if result.Infos had more than one element, the k8s request returned more than 1 resource type which is not correct for a table.

The result specifies pods as a resource type, so the assumption was wrong. Multiple Infos objects resulted from client dividing requests into chunks, as specified by RequestChunksOf function on request builder.

The change merges all Info objects into one table and returns it.

fixes: #905

@nebril nebril requested a review from a team as a code owner July 7, 2023 10:18
@nebril nebril requested a review from joamaki July 7, 2023 10:18
@nebril nebril temporarily deployed to ci July 7, 2023 10:18 — with GitHub Actions Inactive
This change fixes a bug which caused clusters with more than 500 pods to
fail pod summary step.

The code assumed that if result.Infos had more than one element, the k8s
request returned more than 1 resource type which is not correct for a
table.

The result specifies pods as a resource type, so the assumption was
wrong. Multiple Infos objects resulted from client dividing requests
into chunks, as specified by RequestChunksOf function on request
builder.

The change merges all Info objects into one table and returns it.

Signed-off-by: Maciej Kwiek <maciej@isovalent.com>
@nebril nebril force-pushed the pr/nebril/fix-k8s-pods-table branch from d57e1b0 to 9b5c954 Compare July 7, 2023 11:57
@nebril nebril temporarily deployed to ci July 7, 2023 11:58 — with GitHub Actions Inactive
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 12, 2023
@tklauser tklauser merged commit 4aedb5d into main Jul 12, 2023
19 checks passed
@tklauser tklauser deleted the pr/nebril/fix-k8s-pods-table branch July 12, 2023 09:37
@pchaigno
Copy link
Member

Nice catch! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sysdump: Failing to collect pod summary
4 participants