Skip to content

Conversation

@CAICAIIs
Copy link
Contributor

@CAICAIIs CAICAIIs commented Sep 10, 2025

What does this PR do?

Replaces panic with proper error handling when cluster extension fails. This prevents the application from crashing and allows errors to be handled gracefully.

Why is it needed?

Using error handling instead of panic improves system stability and reliability.

Related to #3008

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 0% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.59%. Comparing base (53b4f39) to head (8f27792).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
config/reference_config.go 0.00% 17 Missing ⚠️
registry/directory/directory.go 0.00% 11 Missing and 1 partial ⚠️
registry/protocol/protocol.go 0.00% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3021      +/-   ##
===========================================
- Coverage    39.62%   39.59%   -0.03%     
===========================================
  Files          457      457              
  Lines        38878    38901      +23     
===========================================
- Hits         15406    15404       -2     
- Misses       22214    22237      +23     
- Partials      1258     1260       +2     

☔ 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.

Copy link
Member

@No-SilverBullet No-SilverBullet left a comment

Choose a reason for hiding this comment

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

Because no error is returned here, if it is adjusted to return nil, is there a risk of panic in other referenced places? If so, including unit tests, they also need to be adjusted.

@CAICAIIs
Copy link
Contributor Author

Because no error is returned here, if it is adjusted to return nil, is there a risk of panic in other referenced places? If so, including unit tests, they also need to be adjusted.

got it. I'll look for other places that reference it.

@marsevilspirit
Copy link
Member

I prefer to use panic to deal with these serious and irreverable problems.

@sonarqubecloud
Copy link

@AlexStocks AlexStocks merged commit bd001fe into apache:develop Sep 20, 2025
8 checks passed
@CAICAIIs CAICAIIs deleted the fix-cluster-panic branch October 31, 2025 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants