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

Removing a branch at Parallel does not clean up underlying resources #5757

Closed
odacremolbap opened this issue Sep 27, 2021 · 1 comment · Fixed by #5775
Closed

Removing a branch at Parallel does not clean up underlying resources #5757

odacremolbap opened this issue Sep 27, 2021 · 1 comment · Fixed by #5775
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@odacremolbap
Copy link
Contributor

Describe the bug
Removing a branch in a parallel object does not remove underlying resources

Expected behavior
Removing a branch in a parallel object should remove the no longer used channel and subscription.
This same issue was recently fixed for sequences.

To Reproduce
Follow docs to create a Parallel object with at least 2 branches:
https://knative.dev/docs/eventing/samples/parallel/multiple-branches/

Expected subscriptions and channels look like this:

$ kubectl get subscriptions.messaging.knative.dev 
NAME                                     AGE    READY   REASON
odd-even-parallel-kn-parallel-0          8m9s   True    
odd-even-parallel-kn-parallel-1          8m9s   True    
odd-even-parallel-kn-parallel-filter-0   8m9s   True    
odd-even-parallel-kn-parallel-filter-1   8m9s   True 

$ kubectl get inmemorychannels.messaging.knative.dev 
NAME                              URL                                                                           AGE     READY   REASON
odd-even-parallel-kn-parallel     http://odd-even-parallel-kn-parallel-kn-channel.default.svc.cluster.local     7m56s   True    
odd-even-parallel-kn-parallel-0   http://odd-even-parallel-kn-parallel-0-kn-channel.default.svc.cluster.local   7m56s   True    
odd-even-parallel-kn-parallel-1   http://odd-even-parallel-kn-parallel-1-kn-channel.default.svc.cluster.local   7m56s   True    

Remove one branch from the parallel and list channels and subscriptions again. The first branch's subscription has been re-defined (see AGE column) but the removed branch subscription and channel are still present but unused:

$ kubectl get subscriptions.messaging.knative.dev 
NAME                                     AGE     READY   REASON
odd-even-parallel-kn-parallel-0          23s     True    
odd-even-parallel-kn-parallel-1          9m33s   True    
odd-even-parallel-kn-parallel-filter-0   23s     True    
odd-even-parallel-kn-parallel-filter-1   9m33s   True    

kubectl get inmemorychannels.messaging.knative.dev 
NAME                              URL                                                                           AGE     READY   REASON
odd-even-parallel-kn-parallel     http://odd-even-parallel-kn-parallel-kn-channel.default.svc.cluster.local     9m22s   True    
odd-even-parallel-kn-parallel-0   http://odd-even-parallel-kn-parallel-0-kn-channel.default.svc.cluster.local   9m22s   True    
odd-even-parallel-kn-parallel-1   http://odd-even-parallel-kn-parallel-1-kn-channel.default.svc.cluster.local   9m22s   True    

Knative release version
Eventing v0.24

@odacremolbap odacremolbap added the kind/bug Categorizes issue or PR as related to a bug. label Sep 27, 2021
@odacremolbap
Copy link
Contributor Author

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant