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

Optimised fleet update function of e2e test #603

Merged
merged 4 commits into from
May 22, 2024

Conversation

LiZhenCheng9527
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
Optimised fleet update function of e2e test
Which issue(s) this PR fixes:
a part of #436

Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for kurator-dev canceled.

Name Link
🔨 Latest commit 421010a
🔍 Latest deploy log https://app.netlify.com/sites/kurator-dev/deploys/65e6871c26c44b0008afaa56

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is over design. If we want to implement a update function that do not conflict.
There are two ways:

  1. using patch instead of update
  2. Add this Get and Copy logic after an update conflict

e2e/resources/fleet.go Outdated Show resolved Hide resolved
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
@LiZhenCheng9527 LiZhenCheng9527 force-pushed the update-fleet branch 2 times, most recently from 19dbb53 to ee27c83 Compare February 23, 2024 08:47
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
return getErr
}
attachedCluster.ResourceVersion = originalAttachedCluster.ResourceVersion
attachedClusterPatchData, createPatchErr := CreatePatchData(originalAttachedCluster, attachedCluster)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it remove the labels and status we set

@LiZhenCheng9527
Copy link
Contributor Author

LiZhenCheng9527 commented Mar 1, 2024

This PR has been revised and is ready to be reviewed.
@hzxuzhonghu

return patchData, nil
}

func ModifiedObjectMeta(original, modified metav1.ObjectMeta) metav1.ObjectMeta {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we donot need to deepcopy the object meta

Signed-off-by: LiZhenCheng9527 <lizhencheng6@huawei.com>
Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@kurator-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

@kurator-bot kurator-bot merged commit 693d66d into kurator-dev:main May 22, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants