-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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 of not initializing extensions in the plugin properly #5236
Fix the problem of not initializing extensions in the plugin properly #5236
Conversation
Signed-off-by: John Niang <johnniang@foxmail.com>
Signed-off-by: John Niang <johnniang@foxmail.com>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5236 +/- ##
============================================
- Coverage 57.06% 57.03% -0.03%
- Complexity 3333 3338 +5
============================================
Files 584 584
Lines 19190 19221 +31
Branches 1444 1445 +1
============================================
+ Hits 10950 10963 +13
- Misses 7664 7680 +16
- Partials 576 578 +2 ☔ View full report in Codecov by Sentry. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
应该是删除的资源中包含了 finalizers,此时负责删除 finalizers 的 reconciler 已经停止了。目前对 core 中的 reconciler 的启动顺序做了处理,可能是插件中的 reconciler 提前停止导致的。稍后我排查一下。 |
好的 ❤️🔥 |
目前我更倾向系统停止的时候不执行 |
Halo 停止时,是否可以通过不发出插件停止事件 HaloPluginStoppedEvent 来实现呢 |
我们只需要在 destroy PluginManager 的时候不调用
|
那需要测试一下停止 Halo 时插件的 ApplicationContext 能否被正确关闭如果可以的话应该没什么问题 |
/hold |
Close in favor of #5251. /close |
#### What type of PR is this? /kind improvement /area core /area plugin /milestone 2.12.x #### What this PR does / why we need it: This PR mainly simplifies halo plugin manager. Before this, - we have too many repeat code from super class, which is uncessary - we maintain plugin application context in ExtensionComponentsFinder, which is uncessary and is hard to manage - we fire halo plugin event in halo plugin manager, which is complicated and leads to too many repeat code This PR does: - refactor halo plugin manager - wrap base plugin with spring plugin which contains application context - remove ExtensionComponentsFinder - bridge halo plugin event and spring plugin event - wait extensions fully deleted when stopping Meanwhile, this PR will supersede PR <#5236>. #### Which issue(s) this PR fixes: Fixes #5226 #### Special notes for your reviewer: Test installing, enabing, disabling, upgrading, reloading and deleting plugins. #### Does this PR introduce a user-facing change? ```release-note None ```
What type of PR is this?
/kind bug
/area core
/milestone 2.12.x
What this PR does / why we need it:
This PR waits extensions deleted when stopping plugins and rearrange destruction order between plugin manager and reconcilers.
See #5226 for more.
Which issue(s) this PR fixes:
Fixes #5226
Special notes for your reviewer:
Does this PR introduce a user-facing change?