fabric8-services / fabric8-wit

wit stands for Work Item Tracker
http://devdoc.almighty.io/
Apache License 2.0
45 stars 86 forks source link

deletes pipelines on space removal #2352

Open hrishin opened 5 years ago

hrishin commented 5 years ago

Pipelines don't get deleted while removing a space which leaves dangling pipelines in OpenShift.

This patch deletes the pipelines while removing a space

Patch adds

Fixes -https://github.com/openshiftio/openshift.io/issues/3802

hrishin commented 5 years ago

force pushed by mistake :/

sbose78 commented 5 years ago

Btw, in follow-up PRs, do you plan to remove 'apps' from -stage and -run as well while deleting a space :) ?

hrishin commented 5 years ago

Thank you :+1: @nurali-techie @sbose78 for initial review.

Btw, in follow-up PRs, do you plan to remove 'apps' from -stage and -run as well while deleting a space

Its already taken care by existing code https://github.com/fabric8-services/fabric8-wit/blob/master/controller/space.go#L359
Is that what you mean @sbose78 ?

codecov[bot] commented 5 years ago

Codecov Report

Merging #2352 into master will decrease coverage by 0.31%. The diff coverage is 20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2352      +/-   ##
==========================================
- Coverage   70.18%   69.86%   -0.32%     
==========================================
  Files         171      173       +2     
  Lines       16919    17056     +137     
==========================================
+ Hits        11874    11916      +42     
- Misses       3893     3980      +87     
- Partials     1152     1160       +8
Impacted Files Coverage Δ
controller/deployments.go 70.2% <ø> (+14.35%) :arrow_up:
controller/platform_clients.go 0% <0%> (ø)
controller/pipelines.go 0% <0%> (ø)
controller/space.go 69.88% <100%> (+0.23%) :arrow_up:
kubernetes/deployments_kubeclient.go 71.81% <66.66%> (-0.2%) :arrow_down:
workitem/workitem_repository.go 68.02% <0%> (+0.22%) :arrow_up:

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 d7fb836...0b1e507. Read the comment docs.

ppitonak commented 5 years ago

@hrishin @michaelkleinhenz what is the next step with this PR?

michaelkleinhenz commented 5 years ago

@ppitonak let's coordinate with @kwk on Monday. He was also working on delete spaces.

hrishin commented 5 years ago

@ppitonak will update this PR soon, got sidetrack from this work.

Thanks, @michaelkleinhenz for heads up, will sync with @kwk.