fix: adopt apple/container 1.3.0, replace removed "auto" registry scheme - #133
Merged
Conversation
apple/container#2100 deletes RequestScheme.auto and the internal-host detection behind it, so every non-toggled registry connection would default to https and a plain-HTTP registry on localhost or a private network becomes unreachable. RegistrySchemeResolver ports that detection verbatim (localhost, the daemon's internal DNS domain, and the RFC 1918 / loopback IPv4 ranges resolve to http) and drives the single-host pull, push, recreate and registry-login paths. run/machine create can't use it: their one Flags.Registry scheme fans out to the init-image fetch too, so per-host detection isn't safe there and the insecure toggle becomes the only path to http for those two. Also bumps containerization to 0.41.0 (required by 1.3.0), which drops the redundant v8 variant from arm64's Platform.description (apple/containerization#783) - the one test assertion updated to match. Compatibility floor stays at 1.2: nothing in 1.3.0 adds an API Berthly newly calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #129.
What
Adopts apple/container 1.3.0 (and its required containerization 0.41.0).
RequestScheme.autoremoval (apple/container#2100)1.3.0 deletes
RequestScheme.autoand the internal-host detection behind it, soschemeFornow returnshttpsfor every host unless the caller already chosehttp. Without the old heuristic a plain-HTTP registry onlocalhostor aprivate network is unreachable unless the user ticks "Allow insecure registry".
New
RegistrySchemeResolverports that detection verbatim —localhost, thedaemon's internal DNS domain, and the RFC 1918 / loopback IPv4 ranges resolve to
http; everything else tohttps— and drives the paths where Berthly controlsa single host:
resolveRegistryConnectionTarget(login),pullImage,pushImage,recreateContainer.runRegistryFlags/machineRegistryFlagscan't use it: their oneFlags.Registryscheme fans out to the init-image fetch too(
Utility.containerConfigFromFlags), so per-host detection isn't safe there. Theinsecure toggle keeps its "force http" meaning and becomes the only path to
httpforrun/machine createagainst an untoggled internal registry —documented as a deliberate gap in
PARITY.md(pullthenrunfor the sameresult without the toggle).
The vminit base-image pull is hardcoded to
.https(Apple's registry, not routedthrough the resolver so a user's internal DNS domain can't match it).
containerization 0.41.0
Required by 1.3.0. apple/containerization#783
drops the redundant
v8variant from arm64'sPlatform.description(matchingDocker/containerd) — one test assertion updated. The
Platformequality fix(#833) doesn't affect
builderPlatform(line 2433 mirrors 1.3.0's ownBuilderStart.swift:116verbatim).
Compatibility floor
Stays at 1.2 — nothing in 1.3.0 adds an API Berthly newly calls, so a 1.2.x
daemon still works. Only the SPM pin moved.
Test plan
xcodebuild build— succeedsxcodebuild build-for-testing(all test targets incl. UITests/E2E) — succeedsBerthlyTests— 532 pass, 0 failures (newRegistrySchemeResolverTests,runRegistryFlagsDefaultToHTTPS)swiftlint lint --strict— 0 violations(#2107 /
#2136) on the
fetchDiskUsagepath — stricter input checks, Berthly passes real volume names, no expected impact.
Follow-ups (separate issues)
#130 tmpfs fix verification · #131 k8s PARITY.md rationale · #132 mock kernel fixtures