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

refactor: plugin path in annotations when plugin installation #4179

Merged
merged 2 commits into from Jul 19, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented Jul 4, 2023

What type of PR is this?

/kind improvement
/area core
/area plugin
/milestone 2.7.x

What this PR does / why we need it:

修复生产模式下插件安装时的位置信息为绝对路径会影响迁移的问题

how to test it?

  1. 生产模式下安装插件看 annotation 中 plugin.halo.run/plugin-path 的值是否为相对于 pluginsRoot 的相对路径
  2. 在生产模式下在 main 分支启动后安装的插件切换到此 PR 后 plugin.halo.run/plugin-path 是否变为相对路径

Which issue(s) this PR fixes:

Fixes #4178

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/improvement Categorizes issue or PR as related to a improvement. labels Jul 4, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.7.x milestone Jul 4, 2023
@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 Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #4179 (6fbc615) into main (e6f3175) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

@@             Coverage Diff              @@
##               main    #4179      +/-   ##
============================================
- Coverage     60.14%   60.13%   -0.01%     
  Complexity     2413     2413              
============================================
  Files           366      366              
  Lines         12587    12586       -1     
  Branches        906      906              
============================================
- Hits           7570     7569       -1     
  Misses         4578     4578              
  Partials        439      439              
Impacted Files Coverage Δ
...pp/core/extension/reconciler/PluginReconciler.java 53.04% <75.00%> (-0.11%) ⬇️

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 Jul 15, 2023
@guqing
Copy link
Member Author

guqing commented Jul 17, 2023

/milestone 2.8.x
/cherry-pick release-2.7.0

@halo-dev-bot
Copy link
Collaborator

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

In response to this:

/milestone 2.8.x
/cherry-pick release-2.7.0

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 f2c-ci-robot bot modified the milestones: 2.7.x, 2.8.x Jul 17, 2023
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

It works very well.

curl 'http://localhost:8090/apis/api.console.halo.run/v1alpha1/plugins?keyword=&page=1&size=20' \
  -s | jq '.items[].metadata.annotations["plugin.halo.run/plugin-path"]'
"PluginStackEdit-1.0.0.jar"
"PluginBytemd-1.2.0.jar"
"app-store-1.0.0-SNAPSHOT.jar"
"PluginSearchWidget-1.0.0.jar"
"PluginSitemap-1.0.2.jar"
"PluginCommentWidget-1.5.0.jar"
"PluginFeed-1.1.1.jar

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Jul 19, 2023

[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 /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 Jul 19, 2023
@f2c-ci-robot f2c-ci-robot bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@JohnNiang
Copy link
Member

/lgtm

Please note that the current PR may not be cherrypicked to release-2.7.

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Jul 19, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 1dc2f6f into halo-dev:main Jul 19, 2023
4 checks passed
@halo-dev-bot
Copy link
Collaborator

@guqing: cannot checkout release-2.7.0: error checking out release-2.7.0: exit status 1. output: error: pathspec 'release-2.7.0' did not match any file(s) known to git

In response to this:

/milestone 2.8.x
/cherry-pick release-2.7.0

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.

@guqing guqing deleted the refactor/4178 branch July 19, 2023 02:42
@ruibaby ruibaby modified the milestones: 2.8.x, 2.8.0 Jul 19, 2023
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/improvement Categorizes issue or PR as related to a improvement. 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.

优化插件安装时的位置信息
4 participants