mirror of
https://github.com/moby/buildkit.git
synced 2026-08-10 17:14:08 +00:00
In the scenario with no session id, then the oci-layout resolver would still attempt to load a caller with the empty session id. This inevitably failed, and would fallback to any caller, but this would take 5 seconds to fail with the configured timeout. In a fresh pull of an OCI image context, this could take up to 15 seconds, as 3 separate calls to the relevant functions would be made. This patch fixes the issue by correctly identifying this case, and directly falling through to any caller. Additionally, if a session id is present, it will always be loaded with no fallback available. To do this consistently, the helper methods are refactored into a more consistent withCaller function. Signed-off-by: Justin Chadwell <me@jedevc.com>