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

[YUNIKORN-521] Placeholder pods are not cleaned when the job is deleted #232

Merged
merged 5 commits into from Mar 16, 2021

Conversation

kingamarton
Copy link
Contributor

Filled ownreference field for the placeholder pods

…is deleted

Filled  ownreference field for the placeholder pods
@kingamarton kingamarton self-assigned this Feb 19, 2021
@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #232 (00aeaad) into master (c47ed51) will decrease coverage by 0.32%.
The diff coverage is 57.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #232      +/-   ##
==========================================
- Coverage   59.75%   59.43%   -0.33%     
==========================================
  Files          35       35              
  Lines        3133     3229      +96     
==========================================
+ Hits         1872     1919      +47     
- Misses       1180     1228      +48     
- Partials       81       82       +1     
Impacted Files Coverage Δ
pkg/appmgmt/appmgmt_recovery.go 67.50% <0.00%> (-8.18%) ⬇️
pkg/cache/amprotocol_mock.go 0.00% <0.00%> (ø)
pkg/cache/task.go 74.40% <ø> (ø)
pkg/common/resource.go 90.72% <0.00%> (-9.28%) ⬇️
pkg/common/utils/gang_utils.go 67.94% <0.00%> (-13.59%) ⬇️
pkg/controller/application/app_controller.go 71.05% <ø> (-0.26%) ⬇️
...missioncontrollers/webhook/admission_controller.go 33.74% <0.00%> (+1.00%) ⬆️
pkg/cache/application_events.go 43.33% <8.33%> (-9.73%) ⬇️
pkg/cache/application.go 72.84% <64.17%> (-3.90%) ⬇️
pkg/common/si_helper.go 63.15% <80.00%> (ø)
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8b95bf...00aeaad. Read the comment docs.

Copy link
Contributor

@yangwwei yangwwei left a comment

Choose a reason for hiding this comment

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

Can we add some UT in general_test.go ? that needs to cover the case where the pod has ownerReference and hasn't.

pkg/appmgmt/general/general.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wilfred-s wilfred-s left a comment

Choose a reason for hiding this comment

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

Couple of small points more about style than code content.

pkg/cache/application.go Outdated Show resolved Hide resolved
pkg/cache/placeholder.go Outdated Show resolved Hide resolved
pkg/cache/placeholder_manager_test.go Outdated Show resolved Hide resolved
pkg/cache/placeholder.go Outdated Show resolved Hide resolved
Copy link
Contributor

@yangwwei yangwwei left a comment

Choose a reason for hiding this comment

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

LGTM

@yangwwei yangwwei merged commit efccf9d into apache:master Mar 16, 2021
yangwwei pushed a commit that referenced this pull request Mar 16, 2021
…ed (#232)

Add the owner reference to the placeholder pods in order to do proper cleanup.
The owner reference is the same value as the first pod of the app's owner reference,
if the first pod doesn't have an owner reference set, it is set to the pod's object.
craigcondit pushed a commit to craigcondit/yunikorn-k8shim that referenced this pull request May 10, 2022
…ed (apache#232)

Add the owner reference to the placeholder pods in order to do proper cleanup.
The owner reference is the same value as the first pod of the app's owner reference,
if the first pod doesn't have an owner reference set, it is set to the pod's object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants