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

fix crr is stuck when multi crrs specify same pod together #1653

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chengjoey
Copy link
Contributor

Ⅰ. Describe what this PR does

fix crr is stuck when multi crrs specify same pod together #1626

when multi crrs specify same pod at the same time, only one will be enqueue

func objectKey(obj *appsv1alpha1.ContainerRecreateRequest) string {
return obj.Namespace + "/" + obj.Spec.PodName
}

The original logic may be designed this way intentionally, but would it be better to use ${namespace}/${crdName} as the key?

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

@kruise-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign furykerry for approval by writing /assign @furykerry in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@kruise-bot kruise-bot added the size/XS size/XS: 0-9 label Jun 28, 2024
@chengjoey
Copy link
Contributor Author

Also, is it possible to modify the webhook to directly reject requests when there is a running crr processing the same pod?

Copy link

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.46%. Comparing base (0d0031a) to head (dc0fcdf).
Report is 110 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1653      +/-   ##
==========================================
+ Coverage   47.91%   49.46%   +1.54%     
==========================================
  Files         162      183      +21     
  Lines       23491    18997    -4494     
==========================================
- Hits        11256     9396    -1860     
+ Misses      11014     8378    -2636     
- Partials     1221     1223       +2     
Flag Coverage Δ
unittests 49.46% <ø> (+1.54%) ⬆️

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.

@zmberg
Copy link
Member

zmberg commented Jul 31, 2024

Also, is it possible to modify the webhook to directly reject requests when there is a running crr processing the same pod?

@chengjoey agree.

Copy link

stale bot commented Oct 30, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Oct 30, 2024
@furykerry furykerry removed the wontfix This will not be worked on label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS size/XS: 0-9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants