Wrap local calls to the content and lease service#44091
Wrap local calls to the content and lease service#44091thaJeztah merged 1 commit intomoby:masterfrom
Conversation
|
Looks like this test-helper avoided this case by setting a namespace on the context; moby/daemon/images/store_test.go Lines 43 to 44 in df66487 Slightly confused by that code though;
Haven't fully wrapped my head around it, but wondering now if that test is correct or also should be switching to the wrapped one (depends on what we're testing there I guess). Slight complication in that case is that the wrapped store is in the |
|
There are two ways we are calling containerd:
I'm not sure about the test but in any case the |
The wrapper sets the default namespace in the context if none is provided, this is needed because we are calling these services directly and not trough GRPC that has an interceptor to set the default namespace to all calls. Signed-off-by: Djordje Lukic <[email protected]>
|
@thaJeztah yeah, I'll update 👍 |
5987e03 to
8789066
Compare
- What I did
Fixed the issue where the calls to the content store or the leases manager
would fail because the context doesn't define a namespace.
Wrapped all the calls to the local content and lease services to add
the default namespace in the context.
The wrapper sets the default namespace in the context if none is
provided, this is needed because we are calling these services directly
and not trough GRPC that has an interceptor to set the default namespace
to all calls.
The error is hidden currently because the
manifestMatchesPlatformdoesn'treturn an error if there is one, this PR changes that and now returns an error.
See this comment to see the error that was previously hidden.
- How I did it
Implemented
content.Storeandleases.Manager.- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
