Skip to content

Setting the UID of old object to new object, while using some CD tools(like OCM,Karmada) to update workload#319

Merged
kruise-bot merged 1 commit intoopenkruise:masterfrom
ivan-cai:update_by_cd_tool
Nov 25, 2025
Merged

Setting the UID of old object to new object, while using some CD tools(like OCM,Karmada) to update workload#319
kruise-bot merged 1 commit intoopenkruise:masterfrom
ivan-cai:update_by_cd_tool

Conversation

@ivan-cai
Copy link
Copy Markdown
Contributor

Ⅰ. Describe what this PR does

If updating a deployment by some CD tools(like OCM,Karmada), the UID of new object often is empty. ReplicaSet will not match the deployment, and will Cannot find any activate replicaset for deployment x/x, no need to rolling.

if ref.UID == obj.UID {

Ⅱ. Does this pull request fix one issue?

NONE

@kruise-bot kruise-bot requested review from veophi and zmberg November 25, 2025 07:31
@kruise-bot
Copy link
Copy Markdown

Welcome @ivan-cai! It looks like this is your first PR to openkruise/rollouts 🎉

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.38%. Comparing base (5b48898) to head (c1f3880).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...bhook/workload/mutating/workload_update_handler.go 75.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
+ Coverage   51.36%   51.38%   +0.02%     
==========================================
  Files          66       66              
  Lines        8551     8559       +8     
==========================================
+ Hits         4392     4398       +6     
- Misses       3574     3575       +1     
- Partials      585      586       +1     
Flag Coverage Δ
unittests 51.38% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zmberg
Copy link
Copy Markdown
Member

zmberg commented Nov 25, 2025

/lgtm

…object, while using some CD tools(like OCM,Karmada) to update workload

Signed-off-by: caijing <caijing.cai@alibaba-inc.com>

move set logic into handle workload function

Signed-off-by: caijing <caijing.cai@alibaba-inc.com>
Copy link
Copy Markdown
Member

@furykerry furykerry left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@kruise-bot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: furykerry

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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

@kruise-bot kruise-bot merged commit 0ed750e into openkruise:master Nov 25, 2025
37 checks passed
zmberg pushed a commit that referenced this pull request Nov 25, 2025
…object, while using some CD tools(like OCM,Karmada) to update workload (#319)

move set logic into handle workload function

Signed-off-by: caijing <caijing.cai@alibaba-inc.com>
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.

4 participants