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: add creationTime field for comment extension to resolve migration issue #3341

Merged
merged 6 commits into from
Feb 23, 2023

Conversation

guqing
Copy link
Member

@guqing guqing commented Feb 20, 2023

What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x
/kind api-change

What this PR does / why we need it:

  1. spec 中新增 creationTime
  2. 旧数据的 spec.creationTime 默认等于 approvedTime
  3. 按照 metadata.creationTimestamp 排序的使用 spec.creationTime 代替

how to test it?

  1. 使用迁移插件迁移看评论和回复的排序是否正确
  2. 使用评论插件创建评论和回复看顺序是否正确

Which issue(s) this PR fixes:

Fixes #3330

Special notes for your reviewer:

/cc @halo-dev/sig-halo

Does this PR introduce a user-facing change?

评论和回复新增创建时间以兼容迁移数据的排序

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 20, 2023

@guqing: GitHub didn't allow me to request PR reviews from the following users: halo-dev/sig-halo.

Note that only halo-dev members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

What type of PR is this?

/kind improvement
/area core
/milestone 2.3.x
/kind api-change

What this PR does / why we need it:

  1. spec 中新增 creationTime
  2. 旧数据的 spec.creationTime 默认等于 approvedTime
  3. 按照 metadata.creationTimestamp 排序的使用 spec.creationTime 代替

how to test it?

  1. 使用迁移插件迁移看评论和回复的排序是否正确
  2. 使用评论插件创建评论和回复看顺序是否正确

Which issue(s) this PR fixes:

Fixes #3330

Special notes for your reviewer:

/cc @halo-dev/sig-halo

Does this PR introduce a user-facing change?

评论和回复新增创建时间以兼容迁移数据的排序

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 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 Feb 20, 2023
@f2c-ci-robot f2c-ci-robot bot added this to the 2.3.x milestone Feb 20, 2023
@f2c-ci-robot f2c-ci-robot bot added area/core Issues or PRs related to the Halo Core kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API labels Feb 20, 2023
@guqing
Copy link
Member Author

guqing commented Feb 20, 2023

评论插件的创建时间显示应该是需要对应修改为 creationTime,console 端的评论列表也是但是 console 端可能出现没有值的情况,这种情况是出现在旧数据用 Reconciler 填充也判断不出,如果值为空显示 metadata.creationTimestamp 这个情况后端不好处理前端判断一下, 迁移插件应该也需要支持这个字端 @ruibaby

@ruibaby ruibaby changed the title refactpr: add the creation time allowed for modification to be compatible with the migration order problem refactor: add creationTime field for comment extension to resolve migration issue Feb 21, 2023
@ruibaby
Copy link
Member

ruibaby commented Feb 21, 2023

@LIlGG 有时间修改一下迁移插件吗?

需要注意,这个可能是一个破坏更新,应该要修改 plugin.yaml 的 requires

@JohnNiang
Copy link
Member

当前 PR 是否也修复了 #2889 呢?

@ruibaby
Copy link
Member

ruibaby commented Feb 22, 2023

当前 PR 是否也修复了 #2889 呢?

3.评论的时间格式不是精确的时间,希望能有地方选择时间格式

可以修复第二点,但是第三点似乎还需要评论插件处理。

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 23, 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 23, 2023
@LIlGG
Copy link
Member

LIlGG commented Feb 23, 2023

/lgtm

image

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 23, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 3a1587b into halo-dev:main Feb 23, 2023
@guqing guqing deleted the refactor/reply-order branch February 23, 2023 10:12
@ruibaby ruibaby removed this from the 2.3.x milestone Feb 24, 2023
@ruibaby ruibaby added this to the 2.3.0 milestone Feb 24, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Feb 24, 2023
#### What type of PR is this?

/kind improvement

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

修改评论和回复的创建时间字段。适配:halo-dev/halo#3341

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

Fixes halo-dev/halo#3330

#### Special notes for your reviewer:

None

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

```release-note
None
```
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…lo-dev/console#874)

#### What type of PR is this?

/kind improvement

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

修改评论和回复的创建时间字段。适配:halo-dev#3341

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

Fixes halo-dev#3330

#### Special notes for your reviewer:

None

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

```release-note
None
```
f2c-ci-robot bot pushed a commit to halo-sigs/plugin-migrate that referenced this pull request Mar 30, 2023
#### What type of PR is this?

/kind improvement

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

增加迁移时评论和回复的创建时间字段。适配:halo-dev/halo#3341

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

Fixes halo-dev/halo#3330

#### Special notes for your reviewer:

None

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

```release-note
None
```
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 kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API 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