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

refactor podUpdater interface #166

Merged
merged 8 commits into from
Apr 18, 2024
Merged

Conversation

dbug-dk
Copy link
Collaborator

@dbug-dk dbug-dk commented Mar 15, 2024

  1. fix bug: replace pod by to-replace label, not check new pod status when pod upgrade policy is not replace update

1. Does this PR affect any open issues?(Y/N) and add issue references

fix #182

  • N
  • Y

2. What is the scope of this PR (e.g. component or file name):

collaset_controller reconcile:

  1. syncPods
  2. update

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

  • N
  • Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

  • Unit test
  • Integration test
  • Benchmark (add benchmark stats below)
  • Manual test (add detailed scripts or steps below)
  • Other

6. Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

2. fix bug: replace pod by to-replace label, not check new pod status when pod upgrade policy is not replace update
Copy link

codecov bot commented Mar 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.99%. Comparing base (25ff219) to head (a3f2782).
Report is 2 commits behind head on main.

❗ Current head a3f2782 differs from pull request most recent head ba3463b. Consider uploading reports for the commit ba3463b to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #166      +/-   ##
==========================================
- Coverage   65.66%   63.99%   -1.67%     
==========================================
  Files          74       73       -1     
  Lines        4817     4711     -106     
==========================================
- Hits         3163     3015     -148     
- Misses       1370     1419      +49     
+ Partials      284      277       -7     
Flag Coverage Δ
unittests 63.99% <ø> (-1.67%) ⬇️

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.

pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/synccontrol/sync_control.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
pkg/controllers/collaset/synccontrol/update.go Outdated Show resolved Hide resolved
@ColdsteelRail ColdsteelRail mentioned this pull request Apr 7, 2024
16 tasks
@dbug-dk
Copy link
Collaborator Author

dbug-dk commented Apr 11, 2024

@wu8685 code modified by the cr comments,please review again~

ColdsteelRail
ColdsteelRail previously approved these changes Apr 12, 2024
Copy link
Collaborator

@ColdsteelRail ColdsteelRail left a comment

Choose a reason for hiding this comment

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

lgtm

@wu8685
Copy link
Collaborator

wu8685 commented Apr 17, 2024

Shouldn't we return false here?

…eUpdate GetPodUpdateFinishStatus when replace new pair pod is not exist
@dbug-dk
Copy link
Collaborator Author

dbug-dk commented Apr 17, 2024

Shouldn't we return false here?

yes, I'll change this.

Copy link
Collaborator

@wu8685 wu8685 left a comment

Choose a reason for hiding this comment

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

lgtm

@wu8685 wu8685 merged commit 8b1d3a9 into KusionStack:main Apr 18, 2024
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2024
@dbug-dk dbug-dk deleted the updater-refactor branch April 18, 2024 02:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: PodUpdater need refactoring to provide more general interface
3 participants