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

优化插件安装时的位置信息 #4178

Closed
guqing opened this issue Jul 4, 2023 · 0 comments · Fixed by #4179
Closed

优化插件安装时的位置信息 #4178

guqing opened this issue Jul 4, 2023 · 0 comments · Fixed by #4179
Assignees
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Milestone

Comments

@guqing
Copy link
Member

guqing commented Jul 4, 2023

Your current Halo version

latest

Describe this feature

如下,首次安装时 plugin.halo.run/plugin-path anotation 的值是一个绝对路径,这会影响迁移

{
    "spec": {
        "displayName": "highlight.js 代码高亮"
    },
    "apiVersion": "plugin.halo.run/v1alpha1",
    "kind": "Plugin",
    "metadata": {
        "finalizers": [
            "plugin-protection"
        ],
        "name": "PluginHighlightJS",
        "annotations": {
            "plugin.halo.run/plugin-path": "/Users/guqing/halo2-dev/plugins/PluginHighlightJS-1.1.0.jar"
        },
        "version": 9,
        "creationTimestamp": "2023-07-04T03:58:42.283900Z"
    }
}

当插件就位于 pluginsRoot 目录时应该使用相对路径,否则使用绝对路径(开发模式),而插件更新不存在这样的问题,因此只需要解决安装应该是遗漏了

Additional information

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

@f2c-ci-robot f2c-ci-robot bot added the kind/improvement Categorizes issue or PR as related to a improvement. label 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 the area/core Issues or PRs related to the Halo Core label Jul 4, 2023
f2c-ci-robot bot pushed a commit that referenced this issue Jul 19, 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?
```release-note
修复生产模式下插件安装时的位置信息为绝对路径会影响迁移的问题
```
@ruibaby ruibaby modified the milestones: 2.7.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
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants