Properly passing annotation changes for Inject (#10231)#10257
Properly passing annotation changes for Inject (#10231)#10257scotran wants to merge 1 commit intolinkerd:mainfrom
Conversation
alpeb
left a comment
There was a problem hiding this comment.
Great catch, thanks!
There are some units tests that are failing because they're still expecting the old "skipped" output. You can run them with go test ./.... Should be an easy fix.
Also, can you please take care of the DCO for the checks to pass?
Finally, it seems that the second returned value from the transform function is always either nil of a single-valued slice, so there might be some simplifications that can be done there. Not a blocker for this PR though, and if you're up to it, can be done as a follow-up PR 😉
|
Hey, sorry been a bit busy lately: I'll try to get those changes done this weekend :) |
… print skipped to stderr. This fix makes sure that changes to when transforming input are appropriately applied to the resulting Go slice. Previously, changes were not being properly propogated to the slice: this change makes sure that changes to the field are properly made. Returning the slice inline makes it explicit that just one is being returned in the slice and that the changes to are being passed. Unit test cases are also changed. Fixes linkerd#10231 For example testing, run: Signed-off-by: Scott Tran <[email protected]>
|
Pulled latest commits and changed the unit tests and added DCO: I believe all the associated tests should be changed now. |
|
Thanks for the fixes @scotran 👍 Maybe in |
|
Closing this one. Please reopen if you're still interested in picking this up again. |
|
Are there any changes would you like to make in regards to this PR at this moment? since I saw @kleimkuhler never reviewed this |
Namespaces and services passed to
linkerd injectare annotated properly but print "skipped" to stderr.This fix makes sure that changes to
reportwhen transforming input are appropriately applied to the resulting Go slice. Previously, changes were not being properly propogated to thereportsslice: this change makes sure that changes to theAnnotatedfield are properly made. Returning the slice inline makes it explicit that just onereportis being returned in the slice and that the changes toreportare being passed.Fixes #10231
For example testing, run:
kubectl get ns <namespace> -o yaml | linkerd inject -Signed-off-by: Scott Tran [email protected]