Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Refine problem detail when plugin is already installed #3350

Merged

Conversation

JohnNiang
Copy link
Member

What type of PR is this?

/kind improvement
/area core

What this PR does / why we need it:

This PR refines problem detail of PluginAlreadyExistsException. Please note the new type https://halo.run/probs/plugin-alreay-exists and additional property pluginName of problem detail.

Meanwhile

  • Before

    {
      "type": "about:blank",
      "title": "Plugin Already Exists Error",
      "status": 400,
      "detail": "Plugin PluginCommentWidget already exists.",
      "instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
      "requestId": "880fe8cd-5",
      "timestamp": "2023-02-20T10:17:21.541104Z"
    }
  • After

    {
      "type": "https://halo.run/probs/plugin-alreay-exists",
      "title": "Plugin Already Exists Error",
      "status": 400,
      "detail": "Plugin PluginCommentWidget already exists.",
      "instance": "/apis/api.console.halo.run/v1alpha1/plugins/install",
      "pluginName": "PluginCommentWidget",
      "requestId": "880fe8cd-5",
      "timestamp": "2023-02-20T10:17:21.541104Z"
    }

Which issue(s) this PR fixes:

Fixes #3164

Special notes for your reviewer:

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. area/core Issues or PRs related to the Halo Core labels Feb 20, 2023
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.

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ruibaby

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 Feb 20, 2023
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.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 21, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 7e09cdc into halo-dev:main Feb 21, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Feb 21, 2023
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

安装已存在插件时,支持提示和升级插件。

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3164

#### Screenshots:

<img width="1411" alt="image" src="https://user-images.githubusercontent.com/21301288/220118697-12fbd7a7-57e6-47bb-a03b-b9c280571687.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev/halo#3350 分支。
2. 在插件为 deployment 模式下启动 Halo。
3. 安装任意一个插件,然后继续上传安装相同插件。
4. 观察是否提示升级此插件。

#### Does this PR introduce a user-facing change?

```release-note
Console 端安装已存在插件时,支持提示并升级插件。
```
@ruibaby ruibaby added this to the 2.3.0 milestone Feb 24, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…dev/console#871)

#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

安装已存在插件时,支持提示和升级插件。

#### Which issue(s) this PR fixes:

Fixes halo-dev#3164

#### Screenshots:

<img width="1411" alt="image" src="https://user-images.githubusercontent.com/21301288/220118697-12fbd7a7-57e6-47bb-a03b-b9c280571687.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev#3350 分支。
2. 在插件为 deployment 模式下启动 Halo。
3. 安装任意一个插件,然后继续上传安装相同插件。
4. 观察是否提示升级此插件。

#### Does this PR introduce a user-facing change?

```release-note
Console 端安装已存在插件时,支持提示并升级插件。
```
@JohnNiang JohnNiang deleted the refactor/plugin-already-exists branch March 15, 2023 06:32
# for free to join this conversation on GitHub. Already have an account? # 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 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.

重复安装已存在的插件时提示升级
3 participants