-
-
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: optional plugin dependencies not working correctly #7094
fix: optional plugin dependencies not working correctly #7094
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7094 +/- ##
============================================
+ Coverage 56.99% 57.20% +0.20%
- Complexity 3999 4033 +34
============================================
Files 714 714
Lines 24110 24266 +156
Branches 1585 1596 +11
============================================
+ Hits 13742 13881 +139
- Misses 9756 9767 +11
- Partials 612 618 +6 ☔ View full report in Codecov by Sentry. |
fa9ea61
to
7b391ef
Compare
7b391ef
to
c825ab7
Compare
application/src/main/java/run/halo/app/plugin/DefaultPluginApplicationContextFactory.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java
Outdated
Show resolved
Hide resolved
application/src/main/java/run/halo/app/plugin/PluginServiceImpl.java
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
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: JohnNiang 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 core
/milestone 2.20.x
What this PR does / why we need it:
修复可选插件依赖功能无法正常工作的问题
Special notes for your reviewer:
使用以下两个插件测试可选依赖:
测试插件集合.zip
使用以下测试用例进行测试:
测试用例1:plugin-feed 插件提供 RSS 扩展功能
安装并启用
plugin-feed
插件。访问
http://localhost:8090/feed/rss.xml
。返回
plugin-feed
提供的 RSS 内容。测试用例 2: plugin-moments 扩展了 plugin-feed 的 RSS 功能(依赖于 plugin-feed)
安装并启用
plugin-feed
和plugin-moments
插件。访问
http://localhost:8090/feed/moments/rss.xml
。返回
plugin-moments
提供的 RSS 内容。测试用例 3: plugin-feed 启用时安装 plugin-moments
启用
plugin-feed
插件。plugin-moments
插件。http://localhost:8090/feed/moments/rss.xml
。plugin-moments
提供的 RSS 路由可访问,并返回正确内容。测试用例 4: plugin-feed 未启用时安装 plugin-moments
未安装或未启用
plugin-feed
插件。plugin-moments
插件。http://localhost:8090/feed/moments/rss.xml
。plugin-moments
的 RSS 路由不可访问,返回 404。plugin-moments
的其他功能正常运行。测试用例 5: plugin-moments 启用后安装 plugin-feed
已安装并启用
plugin-moments
插件。plugin-feed
插件。http://localhost:8090/feed/moments/rss.xml
。plugin-moments
提供的 RSS 路由可访问,并返回正确内容。测试用例 6: 停止 plugin-feed 后验证 RSS 路由
已启用
plugin-feed
和plugin-moments
插件。plugin-feed
插件。http://localhost:8090/feed/moments/rss.xml
。plugin-feed
停止成功。plugin-moments
提供的 RSS 路由不可访问,返回 404。测试用例 7: 重启 Halo 后验证可选依赖插件的启动顺序
已启用
plugin-feed
和plugin-moments
插件。http://localhost:8090/feed/moments/rss.xml
。plugin-moments
提供的 RSS 路由始终可访问。测试用例 8: 必选依赖插件验证
场景 1: 安装 seo 插件时未安装应用市场
未安装
app-store-integration
插件。安装
plugin-seo
插件。提示需要先安装
app-store-integration
插件。场景 2: 停止应用市场插件时 seo 插件仍启用
已启用
app-store-integration
和plugin-seo
插件。停止
app-store-integration
插件。提示需要先停止
plugin-seo
插件。Does this PR introduce a user-facing change?