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

Fix the problem of not being able to initialize preset plugins #5874

Merged

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind bug
/area core
/area plugin
/milestone 2.16.x

What this PR does / why we need it:

This PR refactors plugin running state change method to resolve the problem of not being able to initialize preset plugins due to too small gap between installation and enabling.

Which issue(s) this PR fixes:

Fixes #5867

Does this PR introduce a user-facing change?

解决初始化时无法正常启用插件的问题

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels May 9, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.16.x milestone May 9, 2024
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and wan92hen May 9, 2024 05:42
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core area/plugin Issues or PRs related to the Plugin Provider labels May 9, 2024
@JohnNiang
Copy link
Member Author

/cherrypick release-2.15

@halo-dev-bot
Copy link
Collaborator

@JohnNiang: once the present PR merges, I will cherry-pick it on top of release-2.15 in a new PR and assign it to you.

In response to this:

/cherrypick release-2.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link

codecov bot commented May 9, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 25 lines in your changes are missing coverage. Please review.

Project coverage is 56.50%. Comparing base (5fdf6c0) to head (304fb84).
Report is 161 commits behind head on main.

Files Patch % Lines
...rc/main/java/run/halo/app/plugin/SpringPlugin.java 0.00% 19 Missing ⚠️
...pp/core/extension/reconciler/PluginReconciler.java 50.00% 2 Missing and 2 partials ⚠️
...lo/app/core/extension/endpoint/PluginEndpoint.java 92.85% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #5874      +/-   ##
============================================
- Coverage     56.91%   56.50%   -0.41%     
- Complexity     3319     3462     +143     
============================================
  Files           587      612      +25     
  Lines         18968    20477    +1509     
  Branches       1401     1413      +12     
============================================
+ Hits          10795    11570     +775     
- Misses         7594     8326     +732     
- Partials        579      581       +2     

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

@ruibaby
Copy link
Member

ruibaby commented May 9, 2024

能够正常初始化预设插件,但初始化完成之后访问前台会异常。

image image

halo-log-2024-05-09 14_32.log

Signed-off-by: JohnNiang <johnniang@foxmail.com>
@JohnNiang JohnNiang force-pushed the refactor/change-plugin-state-with-retry branch from da5c72c to 304fb84 Compare May 10, 2024 03:21
Copy link

sonarcloud bot commented May 10, 2024

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.3% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label May 10, 2024
Copy link
Member

@guqing guqing left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

f2c-ci-robot bot commented May 10, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guqing

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 10, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit a629961 into halo-dev:main May 10, 2024
8 checks passed
@halo-dev-bot
Copy link
Collaborator

@JohnNiang: new pull request created: #5883

In response to this:

/cherrypick release-2.15

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

f2c-ci-robot bot pushed a commit that referenced this pull request May 10, 2024
… plugins (#5883)

This is an automated cherry-pick of #5874

/assign JohnNiang

```release-note
解决初始化时无法正常启用插件的问题
```
@ruibaby ruibaby modified the milestones: 2.16.x, 2.16.0 May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core area/plugin Issues or PRs related to the Plugin Provider kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2.15.1 在数据初始化时,无法正常启动预设插件
4 participants