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: WorkloadSpread cannot patch priorityClassName #1877

Merged

Conversation

AiRanthem
Copy link
Member

@AiRanthem AiRanthem commented Jan 9, 2025

Ⅰ. Describe what this PR does

  1. Bugfix: WorkloadSpread cannot patch priorityClassName

Ⅱ. Does this pull request fix one issue?

fixes #1607

Ⅲ. Describe how to verify it

E2E and UT are added. You can verify manually with a yaml like:

apiVersion: apps.kruise.io/v1alpha1
kind: WorkloadSpread
metadata:
  name: workloadspread-demo
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: sleep
  subsets:
    - name: subset-1
      patch:
        spec:
          priorityClassName: high-priority
      maxReplicas: 1
    - name: subset-2

Ⅳ. Special notes for reviews

Copy link

codecov bot commented Jan 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.94%. Comparing base (0d0031a) to head (71690f5).
Report is 142 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1877      +/-   ##
==========================================
+ Coverage   47.91%   50.94%   +3.02%     
==========================================
  Files         162      192      +30     
  Lines       23491    24961    +1470     
==========================================
+ Hits        11256    12716    +1460     
+ Misses      11014    10941      -73     
- Partials     1221     1304      +83     
Flag Coverage Δ
unittests 50.94% <100.00%> (+3.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.

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.

consider separate logging and priority mutation logic into two commits

pkg/util/workloadspread/workloadspread.go Outdated Show resolved Hide resolved
@AiRanthem AiRanthem force-pushed the fix/ws-patching-priority-class-250108 branch from b983c67 to 71690f5 Compare January 10, 2025 04:48
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 cd23dc1 into openkruise:master Jan 10, 2025
44 of 45 checks passed
@AiRanthem AiRanthem changed the title Feature/Bugfix: This commit includes the following two changes: Bugfix: WorkloadSpread cannot patch priorityClassName Jan 10, 2025
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.

[BUG] Creating a WorkloadSpread with a patch for the priorityClassName fails
2 participants