-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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 the problem where extension point might not be obtained when the plugin was started #6006
Fix the problem where extension point might not be obtained when the plugin was started #6006
Conversation
Signed-off-by: JohnNiang <[email protected]>
Quality Gate passedIssues Measures |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6006 +/- ##
============================================
- Coverage 56.91% 56.13% -0.78%
- Complexity 3319 3513 +194
============================================
Files 587 621 +34
Lines 18968 20914 +1946
Branches 1401 1460 +59
============================================
+ Hits 10795 11740 +945
- Misses 7594 8582 +988
- Partials 579 592 +13 ☔ View full report in Codecov by Sentry. |
Note That: 相关片段 private void checkExtensionFinderReady(PluginWrapper pluginWrapper) {
if (extensionFinder instanceof SpringComponentsFinder springComponentsFinder) {
springComponentsFinder.readPluginStorageToMemory(pluginWrapper);
return;
}
// should never happen
throw new PluginRuntimeException("Plugin component classes may not loaded yet.");
}
private void removePluginComponentsCache(String pluginId) {
if (extensionFinder instanceof SpringComponentsFinder springComponentsFinder) {
springComponentsFinder.removeComponentsStorage(pluginId);
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: guqing, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/area plugin
/area core
What this PR does / why we need it:
This PR refactors SpringComponentsFinder to prevent unexpected cleanup, which might lead to not be able to obtain plugin extension when the plugin was started.
The real reason is that entries is initialized by AttachmentReconciler during initialization of some plugins.
Please note the problem cannot be reproduced stably.
Refs:
Which issue(s) this PR fixes:
Fixes #5999
Does this PR introduce a user-facing change?