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

Do not store cpu info if not available #321

Merged
merged 1 commit into from Jan 9, 2023

Conversation

Itxaka
Copy link
Contributor

@Itxaka Itxaka commented Jan 9, 2023

If run on aarch64 there is no info yet from ghw regarding the cpu threads/cores, so we end up with a useless label with zero values.

This patch makes it so its not stored if the value is zero, as youo cant have 0 cores in a cpu

Fixes #320

Signed-off-by: Itxaka igarcia@suse.com

@Itxaka Itxaka requested a review from a team January 9, 2023 09:17
@github-actions github-actions bot added the area/operator operator related changes label Jan 9, 2023
@Itxaka Itxaka changed the title Do not store cpou info if not available Do not store cpu info if not available Jan 9, 2023
@Itxaka Itxaka enabled auto-merge (squash) January 9, 2023 09:17
@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Base: 49.71% // Head: 49.80% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (d9f864c) compared to base (b3ffee1).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head d9f864c differs from pull request most recent head 454b3b7. Consider uploading reports for the commit 454b3b7 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #321      +/-   ##
==========================================
+ Coverage   49.71%   49.80%   +0.08%     
==========================================
  Files          31       31              
  Lines        3536     3542       +6     
==========================================
+ Hits         1758     1764       +6     
  Misses       1626     1626              
  Partials      152      152              
Impacted Files Coverage Δ
pkg/server/register.go 63.95% <100.00%> (+0.51%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@kkaempf kkaempf left a comment

Choose a reason for hiding this comment

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

lgtm

If run on aarch64 there is no info yet from ghw regarding the cpu
threads/cores, so we end up with a useless label with zero values.

This patch makes it so its not stored if the value is zero, as youo cant
have 0 cores in a cpu

Signed-off-by: Itxaka <igarcia@suse.com>
@Itxaka Itxaka merged commit 474c3e9 into rancher:main Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operator operator related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CPU not detected on ARM64 (Raspberry Pi 4)
2 participants