cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Closes #2193

Open AtricoSoftware opened this issue 1 year ago • 3 comments

Context is not copied from parent to child Comment on code states copy if parent has context but code implements copy if child doesn't have context Fix makes behaviour consistent between root and sub commands w.r.t. contexts

AtricoSoftware avatar Oct 01 '24 16:10 AtricoSoftware

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 01 '24 16:10 CLAassistant

Re-pushed and removed check completely - parent context can never be nil so no point checking Context should always be copied

AtricoSoftware avatar Oct 01 '24 16:10 AtricoSoftware

I concur.

This issue makes it very hard to use Cobra in tests so this would be a great fix.

lukaspj avatar Oct 24 '24 21:10 lukaspj

@spf13 Sorry to bother you when you’re busy. I’m having trouble with this bug because the correct TraceId (otel) attached to the Context can’t be retrieved. Who can merge this?

RyogaK avatar Jul 22 '25 07:07 RyogaK