• @guqing guqing created a review on pull request #4276 in halo-dev/halo

    /lgtm

    0 0
  • @guqing guqing commented on issue #4269 in halo-dev/halo

    /area console
    /remove-kind support
    /kind improvement

    0 0
  • @guqing guqing commented on issue #4269 in halo-dev/halo

    这可能是因为后面的版本中添加了用户名规则校验。

    有什么办法解决这种情况吗?

    cc @halo-dev/sig-halo

    /kind support

    更新的时候忽略掉用户名的校验,毕竟更新是不允许修改用户名的

    0 0
  • @guqing guqing pushed to main in guqing/halo-theme-higan

    Below is the list of commits:

    • refactor: background color for author page (7fd628a)
    0 0
  • @guqing guqing pushed to main in guqing/halo-theme-higan

    Below is the list of commits:

    • fix: word break for moment content (19bfe0d)
    • refactor: background color for author page (c7a6416)
    0 0
  • @guqing guqing created a review on pull request #25 in halo-sigs/richtext-editor

    /lgtm

    0 0
  • @guqing guqing pushed to refactor/4273 in guqing/halo

    Below is the list of commits:

    0 0
  • @guqing guqing created a review on pull request #24 in halo-sigs/richtext-editor

    /lgtm

    0 0
  • @guqing guqing commented on pull request #4274 in halo-dev/halo

    将这个 SortableRequest 移动到 extension 目录或者 infra 的 model 下吧,不然交叉引用到 theme 包有点不太好

    0 0
  • @guqing guqing opened pull request #4275 in halo-dev/halo

    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. 安装一个带 console 页面的插件并停用它
    2. 使用 IDEA 在 doStart 方法最后更新数据的地方也就是 https://github.com/halo-dev/halo/blob/834e37cf130f2487fab268c9bc7198555933f0dc/application/src/main/java/run/halo/app/core/extension/reconciler/PluginReconciler.java#L447 处打断点,suspend 勾选为 Thread
      image
    3. 启用插件,会执行到断点处
    4. 使用如下命令更新数据将 status 删除以模拟乐观锁冲突并清除 status 状态排除干扰
    curl -u admin:admin -X PUT http://localhost:8090/apis/plugin.halo.run/v1alpha1/plugins/{name} --data '替换为 plugin 的 json '
    1. 放行端点

    根据上述步骤先在 main 分支浮现然后在切换到此 PR 对比结果,期望插件的状态为启动成功且 status 数据示例如下:
    conditions 有两条会因为乐观锁更新失败一次且entry和stylesheet都有值

    {
            "phase": "STARTED",
            "conditions": [
                {
                    "type": "STARTED",
                    "status": "TRUE",
                    "lastTransitionTime": "2023-07-21T07:46:01.274211Z",
                    "message": "Started successfully",
                    "reason": "STARTED"
                },
                {
                    "type": "FAILED",
                    "status": "FALSE",
                    "lastTransitionTime": "2023-07-21T07:46:01.248001Z",
                    "message": "Failed to update table [extensions]; Version does not match for row with Id [/registry/plugin.halo.run/plugins/PluginBytemd]",
                    "reason": "UnexpectedState"
                }
            ],
            "lastStartTime": "2023-07-21T07:46:01.273625Z",
            "entry": "/plugins/PluginBytemd/assets/console/main.js?version=1.1.0-SNAPSHOT",
            "stylesheet": "/plugins/PluginBytemd/assets/console/style.css?version=1.1.0-SNAPSHOT",
            "logo": "/plugins/PluginBytemd/assets/logo.png?version=1.1.0-SNAPSHOT",
            "loadLocation": "file:///Users/guqing/Development/halo-sigs/plugin-bytemd/"
        }

    Which issue(s) this PR fixes:

    Fixes #4273

    Does this PR introduce a user-facing change?

    修复插件启动成功但更新数据失败而导致插件状态不符合预期的问题
    

    Which issue(s) this PR fixes:

    Fixes #4273

    Does this PR introduce a user-facing change?

    修复插件启动成功但更新数据失败而导致插件状态不符合预期的问题
    
    0 0