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

Make the bpfman-operator report status of "Pending" instead of "Error" when appropriate #409

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anfredette
Copy link
Contributor

If any nodes report an error, the operator will also report an error. However, if there are no errors but some nodes are in a pending state, the operator will report as pending.

Fixes: #399

…" when appropriate

If any nodes are reporting error, the operator will still report error,
however, if there are no errors, but some nodes are in the pending
state, the operator will report pending.

Fixes: bpfman#399

Signed-off-by: Andre Fredette <afredette@redhat.com>
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

Attention: Patch coverage is 11.76471% with 15 lines in your changes missing coverage. Please review.

Project coverage is 31.69%. Comparing base (a43ea20) to head (539b620).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/helpers/helpers.go 0.00% 10 Missing ⚠️
controllers/bpfman-operator/common.go 28.57% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #409   +/-   ##
=======================================
  Coverage   31.69%   31.69%           
=======================================
  Files          66       66           
  Lines        7794     7800    +6     
=======================================
+ Hits         2470     2472    +2     
- Misses       5097     5098    +1     
- Partials      227      230    +3     
Flag Coverage Δ
unittests 31.69% <11.76%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return rec.updateStatus(ctx, appNamespace, appName, bpfmaniov1alpha1.BpfAppCondError,
fmt.Sprintf("bpfProgramReconciliation failed on the following BpfApplicationState objects: %v", failedBpfApplications))
} else if pendingCount != 0 {
return rec.updateStatus(ctx, appNamespace, appName, bpfmaniov1alpha1.BpfAppCondPending, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe its useful to show list of pending apps i.e use slice instead of just a counter similar to how to handle the failed app, WDYT ?

return true
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

no need for else here and the same for failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the bpfman-operator report status of "Pending" instead of "Error" when appropriate
2 participants