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

koordlet: add taskids in statesinformer #2057

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

Conversation

kangclzjc
Copy link
Member

Ⅰ. Describe what this PR does

Add taskids for each pod as an attributes. It's part of the #1974. Resctrl runtime hook will leverage this to write new taskids to resctrl group.

Ⅱ. Does this pull request fix one issue?

#1831

Ⅲ. Describe how to verify it

Ⅳ. Special notes for reviews

V. Checklist

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

@koordinator-bot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign zwzhang0107 after the PR has been reviewed.
You can assign the PR to them by writing /assign @zwzhang0107 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

@kangclzjc kangclzjc changed the title add taskids in statesinformer koordlet: add taskids in statesinformer May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 58.18182% with 23 lines in your changes missing coverage. Please review.

Project coverage is 68.55%. Comparing base (eed98fa) to head (0107ae9).
Report is 25 commits behind head on main.

Files Patch % Lines
pkg/koordlet/statesinformer/impl/states_pods.go 56.60% 17 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2057      +/-   ##
==========================================
- Coverage   68.56%   68.55%   -0.02%     
==========================================
  Files         430      430              
  Lines       39383    39912     +529     
==========================================
+ Hits        27004    27362     +358     
- Misses      10043    10184     +141     
- Partials     2336     2366      +30     
Flag Coverage Δ
unittests 68.55% <58.18%> (-0.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.

@kangclzjc
Copy link
Member Author

@saintube PTAL.

Signed-off-by: Zhang Kang <kang.zhang@intel.com>
@kangclzjc
Copy link
Member Author

@saintube PTAL.

@@ -159,6 +227,11 @@ func (s *podsInformer) syncPods() error {
CgroupDir: genPodCgroupParentDir(pod),
}
newPodMap[string(pod.UID)] = podMeta
if s.config.EnablePodTaskIds && pod.Status.Phase != corev1.PodSucceeded && pod.Status.Phase != corev1.PodFailed {
Copy link
Member

Choose a reason for hiding this comment

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

recommend to use util.IsPodTerminated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants