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

pkg/deviceplugin: do not reset Envs/Annotations from previous loops #1343

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

mythi
Copy link
Contributor

@mythi mythi commented Feb 27, 2023

When more than one device ID is Allocate()'d to a container, Envs/Annotations for all but the last device ID get lost because their cresp.* maps are (re-)instantiated on each loop.

Fix it by doing that only once.

Fixes: 55f3e17

/cc @bart0sh need your approval

@codecov-commenter
Copy link

Codecov Report

Merging #1343 (a03620a) into main (fd67c5c) will increase coverage by 0.02%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##             main    #1343      +/-   ##
==========================================
+ Coverage   51.17%   51.19%   +0.02%     
==========================================
  Files          44       44              
  Lines        4879     4881       +2     
==========================================
+ Hits         2497     2499       +2     
  Misses       2239     2239              
  Partials      143      143              
Impacted Files Coverage Δ
pkg/deviceplugin/server.go 83.52% <100.00%> (+0.18%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

When more than one device ID is Allocate()'d to a container,
Envs/Annotations for all but the last device ID get lost because
their cresp.* maps are (re-)instantiated on each loop.

Fix it by doing that only once.

Fixes: 55f3e17

Signed-off-by: Mikko Ylinen <[email protected]>
Copy link
Member

@bart0sh bart0sh left a comment

Choose a reason for hiding this comment

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

/lgtm

@bart0sh bart0sh merged commit 9df9a18 into intel:main Mar 6, 2023
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.

3 participants