koordinator icon indicating copy to clipboard operation
koordinator copied to clipboard

util: optimize informers transformers

Open dongjiang1989 opened this issue 1 year ago • 10 comments

Ⅰ. Describe what this PR does

The optimization has been inspired by https://github.com/cert-manager/cert-manager/pull/5966

By stripping the rest of the metadata, we can save a bit of memory on clusters with lots of pods.

Ⅱ. Does this pull request fix one issue?

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

  • [x] I have written necessary docs and comments
  • [x] I have added necessary unit tests and integration tests
  • [x] All checks passed in make test

dongjiang1989 avatar Nov 10 '23 08:11 dongjiang1989

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (93f2bc2) 67.52% compared to head (58125df) 67.53%.

Files Patch % Lines
pkg/util/transformer/metadata_transformer.go 45.83% 11 Missing and 2 partials :warning:
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1736   +/-   ##
=======================================
  Coverage   67.52%   67.53%           
=======================================
  Files         413      414    +1     
  Lines       46072    46096   +24     
=======================================
+ Hits        31111    31131   +20     
- Misses      12705    12708    +3     
- Partials     2256     2257    +1     
Flag Coverage Δ
unittests 67.53% <45.83%> (+<0.01%) :arrow_up:

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Nov 10 '23 08:11 codecov[bot]

Maybe golangci-lint timeout?

dongjiang1989 avatar Nov 10 '23 14:11 dongjiang1989

@dongjiang1989 Hi, the transformers are now only used by the scheduler. If you want to apply the same functionality in koord-manager and koordlet, you should update more codes.

eahydra avatar Nov 13 '23 08:11 eahydra

@dongjiang1989 Hi, the transformers are now only used by the scheduler. If you want to apply the same functionality in koord-manager and koordlet, you should update more codes.

Thanks for your review. Code update immediately!

dongjiang1989 avatar Nov 13 '23 09:11 dongjiang1989

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: To complete the pull request process, please assign fillzpp after the PR has been reviewed. You can assign the PR to them by writing /assign @fillzpp in a comment when ready.

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

koordinator-bot[bot] avatar Nov 14 '23 08:11 koordinator-bot[bot]

/milestone 1.5

ZiMengSheng avatar Jan 02 '24 11:01 ZiMengSheng

@ZiMengSheng: The provided milestone is not valid for this repository. Milestones in this repository: [someday, v1.4, v1.5]

Use /milestone clear to clear the milestone.

In response to this:

/milestone 1.5

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

koordinator-bot[bot] avatar Jan 02 '24 11:01 koordinator-bot[bot]

/milestone v1.5

ZiMengSheng avatar Jan 02 '24 11:01 ZiMengSheng

@eahydra Please re-check

dongjiang1989 avatar Feb 04 '24 08:02 dongjiang1989

/assign @ZiMengSheng

songtao98 avatar Jul 16 '24 11:07 songtao98