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

bugfix: pub webhook no longer requires pod ownerRef to exist #1869

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

zmberg
Copy link
Member

@zmberg zmberg commented Dec 27, 2024

Ⅰ. Describe what this PR does

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

Copy link

codecov bot commented Dec 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 50.93%. Comparing base (0d0031a) to head (6bb8b6c).
Report is 140 commits behind head on master.

Files with missing lines Patch % Lines
...ller/podunavailablebudget/pub_pod_event_handler.go 0.00% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1869      +/-   ##
==========================================
+ Coverage   47.91%   50.93%   +3.01%     
==========================================
  Files         162      192      +30     
  Lines       23491    24947    +1456     
==========================================
+ Hits        11256    12706    +1450     
+ Misses      11014    10935      -79     
- Partials     1221     1306      +85     
Flag Coverage Δ
unittests 50.93% <0.00%> (+3.01%) ⬆️

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.

@@ -110,7 +108,7 @@ func GetPubForPod(c client.Client, pod *corev1.Pod) (*policyv1alpha1.PodUnavaila
for i := range pubList.Items {
pub := &pubList.Items[i]
// if targetReference isn't nil, priority to take effect
if pub.Spec.TargetReference != nil {
if pub.Spec.TargetReference != nil && workload != nil {
Copy link
Member

Choose a reason for hiding this comment

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

add ut for pub use selector

Copy link
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

@furykerry furykerry merged commit 79b64c1 into openkruise:master Jan 3, 2025
43 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants