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
Wrap local calls to the content and lease service #44091
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 <djordje.lukic@docker.com>
@thaJeztah yeah, I'll update 👍 |
5987e03
to
8789066
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
- 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
manifestMatchesPlatform
doesn'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.Store
andleases.Manager
.- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)