mirror of
https://github.com/docker/compose.git
synced 2026-10-12 02:13:08 +00:00
Three fixes from glours' review: - ensureProviderImages now skips a provider service declaring neither image: nor build: (legal for a pure resource provider, e.g. one backing a remote Amazon RDS instance). Without the guard, such a service reached pull with a fabricated "<project>-<service>" reference (GetImageNameOrDefault) under source=registry (providerImageSource treats Build == nil as registry-authoritative) -- a name that was never real. Already reachable through existing e2e fixtures (TestDependsOnMultipleProviders' provider1/provider2), only a no-op today because the demo pull() short-circuits on an unset env var, not because of any guard here. - localImageFacts now resolves --digest through the manifest-aware localContentDigest instead of the raw ImageInspect ID. Under BuildKit provenance attestations, the raw ID covers the attestation manifest too and changes on every build even when the runnable image content didn't (#13636), which would make the provider re-sync on every up for no reason -- defeating docs/extension.md's own "identity test" contract for --digest. Threads service.Platform through from runProviderPull so the resolved manifest matches what the provider will actually run. - streamImageTo now distinguishes a failure before the success announce (invalid platform, ImageSave error -- a clean, well-formed error line, channel intact) from one after it (the chunked body truncated, channel unresynchronizable) via a new streamAbortedError type. Only the latter closes stdin; the provider protocol supports several sequential get-image requests per pull invocation, and closing stdin on a clean pre-stream error was killing any other independent request in the same invocation for no reason. Each fix is pinned by a regression test, verified by reverting the fix locally and confirming the new test catches it. Signed-off-by: Nicolas De Loof <[email protected]>