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

[Release-2.10] fix: resolve errors caused by blank annotations #4799

Merged

Conversation

LIlGG
Copy link
Member

@LIlGG LIlGG commented Oct 31, 2023

What type of PR is this?

/kind bug
/area console
/milestone 2.10.x

What this PR does / why we need it:

重构去重元数据的逻辑,解决删除元数据后仍旧提示 key 不能重复的问题。

How to test it?

  1. 在文章列表点击设置按钮
  2. 添加两个个空的元数据,不保存直接关闭设置框。
  3. 再次打开设置框,点击删除空的元数据,查看是否会提示 key 重复。

Which issue(s) this PR fixes:

Fixes #4764

Does this PR introduce a user-facing change?

解决删除元数据后仍旧提示 key 不能重复的问题

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Oct 31, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.11.x milestone Oct 31, 2023
@f2c-ci-robot f2c-ci-robot bot added the area/console Issues or PRs related to the Halo Console label Oct 31, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and QuentinHsu October 31, 2023 07:38
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #4799 (9a5de4c) into release-2.10 (e075aba) will not change coverage.
The diff coverage is n/a.

@@               Coverage Diff               @@
##             release-2.10    #4799   +/-   ##
===============================================
  Coverage           61.54%   61.54%           
  Complexity           2797     2797           
===============================================
  Files                 403      403           
  Lines               14736    14736           
  Branches             1026     1026           
===============================================
  Hits                 9069     9069           
  Misses               5172     5172           
  Partials              495      495           

@ruibaby ruibaby changed the title fix: resolve errors caused by blank metadata fix: resolve errors caused by blank annotations Oct 31, 2023
@LIlGG LIlGG changed the base branch from main to release-2.10 October 31, 2023 09:15
@LIlGG LIlGG force-pushed the fix/empty-annotation-fields branch from d658e70 to 4cf9a79 Compare October 31, 2023 09:19
@LIlGG
Copy link
Member Author

LIlGG commented Oct 31, 2023

经过验证,该问题可能与 Repeater 有关。

#4702 中重构了 Repeater 组件,在此 commit 之前,本地能够稳定复现此问题,而此 commit 之后此问题不再出现。

由于 lixingyong/halo:fix-annotations 镜像包中包含了此 commit , 而在 2.10.1 中是不包含此 commit 的,因此打包镜像至线上不会出问题。当前修改可能无法解决此问题。

/hold

@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 31, 2023
@LIlGG LIlGG removed this from the 2.11.x milestone Nov 1, 2023
@LIlGG
Copy link
Member Author

LIlGG commented Nov 1, 2023

目前已经可以删除报错的重复 key。

@LIlGG
Copy link
Member Author

LIlGG commented Nov 1, 2023

/unhold

@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 1, 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.

如果当前修改应用到 main 分支后,不影响功能的话,建议同时应用到 main 分支。

@ruibaby
Copy link
Member

ruibaby commented Nov 2, 2023

目前已经可以删除报错的重复 key。

是不是可以修改一下 PR 的标题和描述了。

@ruibaby ruibaby changed the base branch from release-2.10 to main November 2, 2023 03:48
@ruibaby ruibaby changed the base branch from main to release-2.10 November 2, 2023 03:48
@LIlGG
Copy link
Member Author

LIlGG commented Nov 2, 2023

如果当前修改应用到 main 分支后,不影响功能的话,建议同时应用到 main 分支。

修改过后的可以应用到 main 分支了。

@LIlGG LIlGG changed the title fix: resolve errors caused by blank annotations [Release-2.10]fix: resolve errors caused by blank annotations Nov 2, 2023
@LIlGG LIlGG changed the title [Release-2.10]fix: resolve errors caused by blank annotations [Release-2.10] fix: resolve errors caused by blank annotations Nov 2, 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

Copy link

f2c-ci-robot bot commented Nov 2, 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 Nov 2, 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 Nov 2, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 65e945c into halo-dev:release-2.10 Nov 2, 2023
2 checks passed
@ruibaby ruibaby added this to the 2.10.2 milestone Nov 2, 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/console Issues or PRs related to the Halo Console 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.

文章元数据错误
4 participants