Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .dap/review/engineering.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,18 @@ and is never read at the boundary produces a devcontainer that silently ignores
devcontainers — the daemon came up unprivileged and its entrypoint never ran (#103).
- The inverse counts too: a value read at the boundary that no parsing path can ever set.

## R2. Path parity — native, shell-out, and each backend
## R2. Path parity — native, shell-out, and the backend boundary

Refines `D1`. This repository implements the same behaviour more than once by design.

- **compose** has a native orchestrator (`compose/orchestrator.go`) and a shell-out path
(`docker compose`). A fix, guard, or flag added to one and not the other is a finding —
name the sibling call site and say what it does instead. Both paths carried the same
recreate bug (#71, #72) and the same entrypoint gap (#103).
- **runtime** has `docker` and `applecontainer` backends behind one interface.
A change to shared orchestration must state what each backend does with it; a change
inside one backend must say whether the other needs the same. Apple diverges from
Docker in ways that have already broken workspaces (below).
- **runtime** has one backend today — `docker` — behind the `runtime.Runtime`
interface. Shared orchestration (engine, compose) must reach it through that
interface; a diff that leaks Docker-specific behaviour into shared code is a
finding, because the interface is what keeps a second backend possible.
- A capability flag on `Capabilities()` (`ServiceNameDNS`, for instance) is the
legitimate way to encode divergence. A silent assumption that all backends behave like
Docker is not.
Expand Down Expand Up @@ -150,4 +150,3 @@ Do not file these here:
documented `Known limitations` in the CHANGELOG. Absence of a non-goal is not a defect.
- Dependency version bumps with no code change, beyond an actual incompatibility you can
point at in the diff.
- The Swift bridge under `applecontainer-bridge/` unless the diff touches it.
7 changes: 1 addition & 6 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,11 @@ The prebuild image provides everything the Linux CI jobs need:
`docker` / `docker compose` from inside the container.
- **GitHub CLI** and `make`.

> The Apple `container` backend (`runtime/applecontainer`) is darwin/arm64-only
> and cannot be built inside this Linux container — exactly as on the Linux CI
> jobs, where `make bridge` is a no-op. Use a native macOS checkout for that
> backend.

## Common tasks

```bash
make lint # golangci-lint run ./...
make test # go test -race ./... (bridge is a no-op on Linux)
make test # go test -race ./...
make test-integration # docker-backed integration suite
```

Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ go.work.sum
# work-in-progress drafts, milestone trackers, etc.
PRD.md
design/private/

# Local applecontainer working directory (not committed).
examples/applecontainer-spike/
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

- **BREAKING — the Apple Containers backend is removed.** `runtime/applecontainer`
and the `applecontainer-bridge` Swift package (reached through a cgo shim) are
deleted, along with the `--runtime applecontainer` CLI value: `--runtime` now
accepts `docker` only, and any other value is refused with
`unknown runtime %q (want docker)`. The backend was darwin/arm64-only, could not
be built or exercised on Linux CI. Its CI jobs were already removed earlier in
this same unreleased line, which is also when Docker became the only documented
backend. Also gone:
the `bridge` / `bridge-clean` Makefile targets (and the `test` /
`test-integration` dependency on them, so neither target shells out to `swift`
any more) and the eight `test/integration/applecontainer_*_test.go` suites.
- The design record `design/runtime-applecontainer.md` is deleted with the code it
described, and its row removed from the `design/` index. It remains readable in
git history at tag `v0.4.3`. `design/compose-native.md` keeps its Apple sections:
per `design/README.md` those records document the state of the world when
written, and the probe results and rejected alternatives in them are still the
reasoning behind the compose orchestrator's shape.
- **BREAKING — checkpoint/restore is gone.** The feature only ever
worked on Podman (docker's restore is broken upstream on
containerd-integrated engines), and the Podman backend existed to
Expand Down
32 changes: 3 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all test test-integration lint fmt vet tidy clean tools bridge bridge-clean
.PHONY: all test test-integration lint fmt vet tidy clean tools

GO ?= go
GOLANGCI_LINT ?= golangci-lint
Expand All @@ -12,13 +12,10 @@ all: lint test
tools:
$(GO) install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)

# test depends on bridge so the embedded dylib is present on
# darwin/arm64 (go:embed fails the build if the file is missing). On
# other platforms bridge is a no-op so this dependency is free.
test: bridge
test:
$(GO) test -race -count=1 ./...

test-integration: bridge
test-integration:
$(GO) test -race -count=1 -tags=integration -timeout=10m ./test/integration/...

lint:
Expand All @@ -36,26 +33,3 @@ tidy:
clean:
$(GO) clean -testcache

# bridge builds libACBridge.dylib via SwiftPM and copies it into
# runtime/applecontainer/embed/ where go:embed picks it up. Required
# before any Go build that imports runtime/applecontainer on
# darwin/arm64. On other platforms it's a no-op so this target can be
# unconditionally listed as a dependency by `test` / `test-integration`
# without burdening Linux CI.
bridge:
@if [ "$$(uname -s)" = "Darwin" ] && [ "$$(uname -m)" = "arm64" ]; then \
cd applecontainer-bridge && swift build -c release && \
mkdir -p ../runtime/applecontainer/embed && \
cp .build/arm64-apple-macosx/release/libACBridge.dylib \
../runtime/applecontainer/embed/libACBridge.dylib; \
else \
echo "bridge: skipped (requires darwin/arm64)"; \
fi

bridge-clean:
@if [ "$$(uname -s)" = "Darwin" ] && [ "$$(uname -m)" = "arm64" ]; then \
(cd applecontainer-bridge && swift package clean && rm -rf .build) && \
rm -f runtime/applecontainer/embed/libACBridge.dylib; \
else \
echo "bridge-clean: skipped (requires darwin/arm64)"; \
fi
1 change: 0 additions & 1 deletion applecontainer-bridge/.gitignore

This file was deleted.

Loading