Commit Graph
100 Commits
Author SHA1 Message Date
J LoganandGitHub 497465635a Remove auto registry scheme. (#2100) 2026-08-10 09:55:53 -07:00
J LoganandGitHub 0925ff6298 Refactor container k8s to use plugin resource management. (#2097) 2026-08-07 14:43:56 -07:00
J LoganandGitHub abff4183b4 Integration test: fix username/uid flake. (#2086) 2026-08-06 20:31:13 -07:00
J LoganandGitHub 60612eef51 Integration test: cache warmup image tarfiles. (#2074)
- When pulling warmup images for concurrent tests, save
  the images to a cache directory under the application root.
- Serial tests that aren't testing pull can save time by restoring
  a cached warmup image.
2026-08-05 11:17:20 -07:00
J LoganandGitHub bc50fcb593 Simplify correlation of test prefix to test ID. (#2071) 2026-08-05 09:32:02 -07:00
J LoganandGitHub cee0ba80cd Log core counts in CI for perf analysis. (#2070) 2026-08-04 18:48:12 -07:00
J LoganandGitHub cb8cad4562 Add readiness signal to DirectoryWatcher, fix DirectoryWatcherTest. (#2066) 2026-08-04 12:17:58 -07:00
J LoganandGitHub 520371cb38 Increase testExecDetachProcessRunning sleep margin to avoid CI flake (#2063) 2026-08-03 15:27:58 -07:00
J LoganandGitHub d1d763530d Fix BuilderStart race, parallelize container build tests. (#2002)
- Closes #2001.
- Handle "container exists" error gracefully instead
  of failing, when trying to start the buildkit container.
- Move build tests to parallel suites, while the builder
  lifecycle tests remain serial. Parallel builds don't
  use the fixture lock that deletes and restarts the
  builder and runs a build block in isolation.
2026-07-23 15:50:59 -07:00
J LoganandGitHub 9af6e0e5e5 Integration test - miscellaneous fixture and test refinements. (#1993) 2026-07-22 17:19:14 -07:00
J LoganandGitHub 72431b0458 Add OCI maskedPaths and readonlyPaths support to Container API. (#1996) 2026-07-22 16:28:26 -07:00
J LoganandGitHub f0b2b96a26 Use enum for warmup images. (#1990)
- Closes #1982.
- Makes warmup image code more readable in tests.
2026-07-22 09:45:33 -07:00
J LoganandGitHub 968dbe49c1 Downgrade swift-collections to 1.5.1. (#1984) 2026-07-22 08:21:50 -07:00
J LoganandGitHub b130babb15 Use ordered journal mode for unpacked images. (#1974) 2026-07-21 17:12:01 -07:00
J LoganandGitHub a6813ed66f Periodic dependency updates. (#1981) 2026-07-21 16:42:33 -07:00
J LoganandGitHub 1e6f78255e Address flaky TestCLIKernelSetSerial suite. (#1976) 2026-07-21 10:40:49 -07:00
J LoganandGitHub e34b1b7fc8 Fix machine ID length test. (#1971) 2026-07-20 16:29:05 -07:00
J LoganandGitHub 07ff3c0a72 Restore --skip-build, enable import testable for release builds. (#1955) 2026-07-16 20:44:37 +05:30
J LoganandGitHub 4dfa3d49d9 Remove --skip-build from test Makefile target. (#1951) 2026-07-15 17:48:12 -07:00
J LoganandGitHub 608902412d Add commit/issue alert to PR template. (#1945) 2026-07-13 13:36:49 -07:00
J LoganandGitHub e1a5cfdc70 Updates containerization to 0.36.0. (#1912)
- Picks up the workaround removal for grpc-swift in Vminitd.
2026-07-07 13:52:19 -07:00
J LoganandGitHub 3ad6e9b8ba Removes obsolete CLITests directory. (#1886)
- Closes #1833.
2026-07-02 17:30:31 -07:00
J LoganandGitHub 76f387e3be Restore reverted migrations, migrate last tests. (#1880)
- Part of #1833.
- CLI progress and registry test migrations were inadventently reverted
by #1857.
- Migrate TestCLINoParallelCases to TestCLIImagePruneSerial and
TestCLINetworkPruneSerial.
- Clean up test selection patterns in Makefile.
- Remove all legacy CLITests files.
- Use swift-testing `withKnownIssue` to run but ignore failures on flaky
`testCreateNameLongestValid` and `testIsolatedNetwork`.
- Extracts a fixture helper for tests requiring a retry loop.
2026-07-02 15:34:46 -07:00
J LoganandGitHub 5973b9cc62 Finalize Makefile for integration test rework. (#1878)
- Part of #1833.
- Replace old targets with new ones.
- Try increased parallelism after test tweaks in #1857.
- Exclude test files from coverage analysis.
2026-07-01 18:25:34 -07:00
J LoganandGitHub 69a2505aeb Migrates container run integration tests. (#1857)
- Part of #1833.
2026-07-01 13:23:16 -07:00
J LoganandGitHub 9bd3c47345 Migrates container create, run-lifecycle, exec, remove, copy. (#1844)
- Part of #1833.
2026-06-30 17:37:51 -07:00
J LoganandGitHub 88ab3192f9 Migrate image, volume and miscellaneous system tests. (#1868)
- Part of #1833.
- Distributes fixture extensions for images and containers added as part
of previous builder PR to more sensible locations.
2026-06-30 15:25:16 -07:00
J LoganandGitHub 586fa07d2a Migrate registry tests to new test support types. (#1845)
- Part of #1833.
2026-06-30 10:40:26 -07:00
J LoganandGitHub d29e6edd5e Migrates network integration tests. (#1858)
- Part of #1833.
2026-06-30 10:00:34 -07:00
J LoganandGitHub 3842977f4a Migrate basic system tests to new test support types. (#1841)
- Part of #1833.
2026-06-29 16:40:06 -07:00
J LoganandGitHub c37c405bbd Migrates container machine tests. (#1856)
- Part of #1833.
2026-06-29 15:58:19 -07:00
J LoganandGitHub 6317a832d4 Adds build fixture and migrates build CLI tests. (#1848)
- Part of #1833.
- Also changes test directory names to include test ID so that they are
easily identifiable.
2026-06-29 12:12:31 -07:00
J LoganandGitHub be3b1f20c4 Migrate some container tests, remove concurrent demo tests. (#1840)
- Part of #1833.
- Tweaks `ContainerFixture.withContainer()` to support the legacy
`longRun()` pattern without boilerplate.
2026-06-26 14:17:18 -07:00
J LoganandGitHub 649164d9e2 Enhanced test fixtures for integration tests. (#1834)
- Part of #1833.
- Adds `ContainerFixture` with scoped resource lifecycle and cleanup in
place of implementation inheritance for test support functions. The
fixture also handles resource prefixing and uses a more ergonomic
`CommandResult` in place of a tuple for return values.
- `ImageWarmup` suite pre-pulls well-known images, and
`copyWarmupImage()` tags test-local refs, keeping the canonical image
store untouched.
- Three-phase `integration-new`: warmup, followed by concurrent tests
(managed by the swift test
`--experimental-maximum-parallelization-width` flag), followed by
serialized tests.
- `coverage-new` merges unit + integration-new profraw, replacing
`coverage` in CI as a migration progress indicator.
- Updates GH workflow so non-coverage invokes both the `integration` and
`integration-new` Makefile targets, while coverage runs invoke the
`coverage-new` target.
2026-06-26 12:00:44 -07:00
J LoganandGitHub 4a6084cc95 Remove network variant computation from API server. (#1814)
- Closes #1812.
- The network plugin is the source of truth for the variant, if any,
that applies to the network. Resolving a missing variant configuration
option in the API server can create a situation where the variant the
runtime uses for interface selection is incorrect.
- Adds serial suites trait to tests to see whether it helps current CI
issues.

## Type of Change
- [x] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
Fixes a flaw in our interface strategy logic.

## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs
2026-06-25 14:06:45 -07:00
J LoganandGitHub 984c4c2c5a Disable flaky CLI test temporarily. (#1828)
- PRs are backed up. We need to rework the CLI tests
  to shorten test time and fix conflicts between tests.

## Testing
- [ ] Tested locally
- [x] Added/updated tests
- [ ] Added/updated docs
2026-06-25 08:42:01 -07:00
J LoganandGitHub 888582b4c8 Propagate permissions for all host-to-container socket mounts. (#1751)
- Closes #1750.
- Applies permission code used for the `--ssh` mount to all
host-to-container socket mounts.
- Adds a user option to the `doExec` test support function.
- Updates the `testRunCommandUnixSocketMount` to install `nc` in the
test container, and check the socket permission, and check the mounted
socket using `nc` as the guest user.
2026-06-18 11:45:24 -07:00
J LoganandGitHub 6508acea81 Adds container machine example. (#1676)
- Closes #1675.
- Illustrates how to create a container machine image that you can use
with the Visual Studio Code remote developement SSH plugin.
2026-06-09 15:51:25 -07:00
J LoganandGitHub ee848e3ebf Add backward compat for ContainerConfig cpuOverhead. (#1665)
1.0 data migration requirement
2026-06-08 15:02:18 -07:00
J LoganandGitHub 90cc3c15af Omit hash scheme from image.id. (#1658)
- Closes #1657.
- Also reduces `trimDigest()` output to 12 characters and gets rid of
the trailing ellipsis.
2026-06-05 14:43:20 -07:00
J LoganandGitHub 59e015acd1 Use name instead of id in NetworkConfiguration. (#1648)
- Closes #1647.
- `id` will become a system assigned (Docker-like) identifier
  for the managed resource, and `configuration.name` is the
  user-assigned name.
2026-06-04 13:03:29 -07:00
J LoganandGitHub 89fa98c55a Write log/error output from commands to stderr. (#1632)
- Closes #1631.
- The standard output should only contain result data,
  so that scripts consuming stdout don't need to scrape.
2026-06-03 16:17:59 -07:00
J LoganandGitHub e20aca8203 Normalize JSON output for network and volume resources. (#1624)
Normalize JSON output for network and volume resources. (#1624)
- Reworks both JSON output presets to use sorted keys, ISO timestamps.
`compact` is used for `ls` output, and `pretty` is used for `inspect`.
- Extracts non-DRY option configuration into presets.
- Closes #1623.
2026-06-01 21:42:10 -07:00
J LoganandGitHub 37595a734c Remove XPC compatibility code, simplify network model. (#1616)
- Refactor network model types: replace `NetworkState` enum and
phase-based NetworkStatus with a flat `NetworkStatus` struct.
- Simplify API server ↔ plugin protocol: plugin `status()` returns
runtime status only, API server owns configuration.
- `NetworksService` `list()`/`create()` now return `NetworkResource`
directly.
- Remove lifecycle phase checks and state machine guards throughout CLI
and API server.
- `variant` is plugin-specific, it's not a required property. This PR
replaces `NetworkPluginInfo` with a `plugin` name property on
`NetworkConfiguration` and an `options` list similar to that for
volumes.
- Moved `variant` to the option list.
2026-05-29 12:33:45 -07:00
J LoganandGitHub c5a8d7a802 Reorganize Swift package targets for network plugin. (#1615)
- Part of #1404.
- Updates containerization to 0.33.2.
- Reorganizes network plugin targets into:
  - `ContainerNetworkClient` - network plugin client and default types
- `ContainerNetworkServer` - separate protocols for `Network` which
manages the underlying virtual network, `NetworkService`, which takes a
network and implements the API, and an actor `NetworkHarness` that
marshals between the API and the XPC protocol. The service-harness
separation will help us ensure XPC protocol compatibility in both
directions as we evolve the plugin APIs.
- Removes `disableAllocator()` which is no longer used since #1545
switched over to using XPC connections between runtime and network
plugin instances to track whether a network has attached containers.
2026-05-28 15:26:31 -07:00
J LoganandGitHub 445c90f927 Fix potential integer math crash on PublishPort. (#1612)
- Closes #1610.
- Discovered, and originally filed as a security advisory, by:
PresidentL <131139636+liyander@users.noreply.github.com>.
- `PublishPort` currently can store invalid combinations of starting
port and range that can overflow UInt16 values when summed, crashing the
process.
- Updates `PublishPort` to validate inputs on initialization.
2026-05-28 11:12:04 -07:00
J LoganandGitHub d43b58ec73 Align JSON output with shape for container resource. (#1611)
- Part of #1404.
- Use `configuration` for configuration properties, `state` for current
state label, `status` for status properties.
2026-05-28 09:07:01 -07:00
J LoganandGitHub ca3a4d6670 Use FilePath for app, install, and log roots. (#1558)
- Closes #1557.
- Replaces `executableURL` utility function for getting app executable
path with `executablePath`.
- Adds `FilePath.resolvingSymlinks()` extension.
- Also converts for FilePath for types in `ContainerVersion` target.
2026-05-26 13:58:55 -07:00
J LoganandGitHub caff1e9b42 Improve readability of progress bar width computation. (#1584)
- Refines bugfix from #1547, no functional changes.
2026-05-22 13:03:09 -07:00
J LoganandGitHub 985248cf23 Refine custom init how-to and BUILDING documentation. (#1586)
- Closes #1540.
- Use a published vminit image in the custom init example.
- Refine the integration test example in BUILDING.md to build in an
isolated app-root directory.

## Type of Change
- [ ] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [x] Documentation update

## Motivation and Context
We don't make `latest` tags for vminit images, so the example would
fail.

## Testing
- [ ] Tested locally
- [ ] Added/updated tests
- [x] Added/updated docs
2026-05-22 09:01:00 -07:00
J LoganandGitHub 04220b12d0 Adds vertical space between groups in help. (#1585)
- Closes #1513.
2026-05-22 08:56:25 -07:00
J LoganandGitHub 3d291ff865 Add notes regarding --log-root to the command reference. (#1582)
- Closes #1529.
2026-05-21 17:19:44 -07:00
J LoganandGitHub 5b83b4a9ac Rename config file to config.toml. (#1568)
- Closes #1565.
- `runtime-config.toml` suggested the config
  pertains to just the runtime (managing container
  workloads) aspect of the system.
- Also renames `ADDR` columns to `IP` in 
  `container ls` and `container builder status`.
2026-05-16 08:23:21 -07:00
J LoganandGitHub f8f7e2cdf0 Ensure read-only user config removed on every startup. (#1567)
- Closes #1566.
- Currently on `system start` we only remove the read-only user config
if the user config file exists. This means that changes to the config
are processed properly on restart, but a removal is ignored, and the old
read-only settings linger.
2026-05-15 19:43:24 -07:00
J LoganandGitHub 615b5a6ffe Relax host-only network test. (#1552)
- Accept three different curl errors that would indicate container has
no external access.
2026-05-14 14:04:49 -07:00
J LoganandGitHub b466959644 Remove IP allocation from API server. (#1545)
- Closes #1318.
- Closes #1378.
- Reduces the complexity and coupling for IP allocation.
- Runtimes connect to networks for the life of the running container.
The runtime shuts down on connection loss.
- Networks automatically deallocate a runtime's IP address and hostname
record on connection loss.
- Removes AllocatedAttachment as this is no longer necessary. The
`bootstrap()` XPC now takes a `NetworkBootstrapInfo` array which
parallels the attachments in the bundle config and provides the network
plugin attributes needed to create VM network interface configurations.

## Type of Change
- [x] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
Simplify IP allocation and make deallocation more reliable.

## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs
2026-05-12 16:34:06 -07:00
J LoganandGitHub c56a659d33 Use allocate with session to automatically clean up IPs. (#1544)
- Part of #1318.
- Part of #1378.
- Removes network plugin `deallocate()`, and allocate takes an
`XPCServerSession` that registers an `onDisconnect` handler that
performs deallocation.
- ContainerService now tracks `networkSessions` for allocations.
2026-05-11 23:08:48 -07:00
J LoganandGitHub 1794afc449 Adds XPC sessions with disconnect handlers. (#1524)
- Part of #1318.
- Part of #1378.
- `RouteHandler` now accepts an additional `XPCServerSession` which
include a disconnect handler.
- `XPCServer` configures a session for each client connection and passes
it to every route handler.
- `XPCServer.route(fn:)` can be used to wrap existing route handlers
that don't care about sessions.
- `XPCClient` adds functions to support client-side session handling.
- Update all existing routes.
2026-05-11 15:49:05 -07:00
J LoganandGitHub 9f4e779421 Switch NetworksService, VolumesService, EntityStore to FilePath. (#1493)
- Closes #1485.
2026-05-01 14:39:03 -07:00
J LoganandGitHub e6ba030fca Sort networks by ID in API server list(). (#1487)
Closes #1483.
Consistent well-defined behavior for server APIs.
2026-04-30 15:42:04 -07:00
J LoganandGitHub 1ee2d9d054 Update documents with note about container-to-host networking. (#1482)
- Currently we need to use `pfctl` to create the packet filter rule for
container-to-host networking (`host.docker.internal`). This approach
unfortunately has a few limitations that require documentation.
2026-04-30 15:05:10 -07:00
J LoganandGitHub 5ec28cffe5 Use SystemPath for HostDNSResolver. (#1480)
- Closes #1479.
- Using URL for filesystem paths is bad practice. FilePath is safer and
more ergonomic.
2026-04-30 15:01:12 -07:00
J LoganandGitHub b1f3c0d35b Use NetworkResource for network management in API server. (#1421)
- Part of #1404.
- Evolves API to use NetworkResource that conforms to ManagedResource.
- BREAKING CHANGE - compile time impact due to changes to Swift client
API signatures. No change to persistent data or API server XPC
protocols.
2026-04-30 11:06:50 -07:00
J LoganandGitHub 472cb1950f Build output should just be tags/paths. (#1478)
- Closes #1477.

## Type of Change
- [x] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
stdout should contain results that can be piped

## Testing
- [x] Tested locally
- [x] Added/updated tests
- [ ] Added/updated docs
2026-04-30 10:29:13 -07:00
4e390d6aa8 Fix RequestScheme formatting. (#1473)
## Type of Change
- [x] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
`main` build broke with last commit.

## Testing
- [ ] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs

---------

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
Co-authored-by: Kathryn Baldauf <k_baldauf@apple.com>
2026-04-29 15:04:24 -07:00
J LoganandGitHub 601f5f113a Merge commit from fork
- Don't prefix match localhost, use exact
  match only.
- Only check default local domain if one is
  defined.
- Use IPv4Address for private IP CIDR tests.
2026-04-29 11:46:22 -05:00
J LoganandGitHub 651811cc09 Fix "not installing shadowed plugin" startup log noise. (#1451)
- Closes #1450.
- If we require that bundle-packaged installs must populate a
Unix-structured `bin` and `libexec`, we don't need the code that
searches the app bundle install root. As it stands, we enumerate both
the app bundle and the Linux paths, meaning we're looking at the same
plugins (in different paths) twice.
2026-04-27 11:32:00 -07:00
J LoganandGitHub 6a3266fbe7 Make ProgressFlags.makeConfig() public. (#1438)
- Closes #1437.
- Allows use by third-party extensions.
2026-04-22 13:02:17 -07:00
J LoganandGitHub 86611f588b Adds journal option to container volume create. (#1412)
- Closes #1411.
- Default behavior doesn't change today - with no `journal` option, no
journal gets created.
2026-04-22 09:34:24 -07:00
J LoganandGitHub ae0fa26f6b Updates containerization dependency to 0.31.0. (#1435)
- Fixes single file mounts. Closes #1251.
- Adds journal modes to `EXT4.Formatter`.
- vminitd fix for client timeouts resulting in EBADF and other minor
improvements.
- Reenable block size for EXT4 formatter, and other fixes.
- Update vminit client and server to grpc-swift-2.
2026-04-21 16:50:56 -07:00
J LoganandGitHub d15fe22e31 Makes bootstrap env parameter compatible with older clients. (#1434)
- Closes #1433.
- Renames `env` parameter to `dynamicEnv` to differentiate these
special-case environment variables from the standard container
environment.
- Use `[String: String]` instead of `[String: String]?`.
- Default to `[:]` when an down-revision client calls bootstrap without
supplying `dynamicEnv`.
2026-04-20 20:38:33 -07:00
J LoganandGitHub acfbf2d2db Update kernel to kata-3.28.0. (#1431) 2026-04-20 15:22:28 -07:00
J LoganandGitHub 04c597c577 Update builder API to use grpc-swift-2. (#1309) (#1416)
- Closes #1308.
- Applies dependency and code changes similar to
apple/containerization#578.
- Upgrades hawkeye to latest version.
- Update StderrLogHandler not to create a (non-Sendable) Swift time
formatter object for every log message.
2026-04-20 08:39:43 -07:00
J LoganandGitHub a1981c30ac API: Rename to NetworkClient, client as instance. (#1405)
- Part of #1404.
- COMPATIBILITY: Breaking change to client API. XPC protocol and
persistent data remain fully compatibile.
- Renames `ClientNetwork` to `NetworkClient`, aligning with
`ContainerClient`.
- Client uses instance methods instead of utility functions, with an
`init(serviceIdentifier:)` for the XPC service name. The value is
currently unused.
2026-04-08 13:41:12 -07:00
J LoganandGitHub e37dcc19a5 Create ResourceLabels and use for ManagedResource, NetworkConfiguration. (#1360)
- Closes #1359.
- Create a ResourceLabels type and extract the label validation from
NetworkConfiguration into the new type.
- Create a base AppError type that is compatible with structured logging
and delegates message presentation to the error receiver.
- Define LabelError over AppError for label validation.
- Slightly reworks NetworkConfiguration entity migration code in
NetworksService.
2026-04-07 16:31:18 -07:00
J LoganandGitHub 2d1d158e06 Dedupe user-supplied IDs for container delete. (#1388)
- Closes #1386.
- Fixes a UX quirk.
2026-04-04 10:07:31 -07:00
J LoganandGitHub 8fb8ad2f6a Relocate Source/Helpers folders to sensible locations. (#1363)
- Closes #1361.
- Tweaks project structure to better reflect
  plugin structure.
2026-03-31 16:36:15 -07:00
J LoganandGitHub 2692c5cff4 Removes unused Archiver.uncompress(). (#1372)
- Nothing uses this function, and it does not perform secure extraction.
  Clients should instead use the `ArchiveReader` from the
  ContainerizationArchive library.
2026-03-31 14:48:31 -07:00
J LoganandGitHub 490cb69cc6 Don't bake DNS server into builder container config. (#1370)
- Closes #656.
- The SandboxService automatically sets the DNS server as part of
bootstrap if no server is given. Setting it in the container config
means that the builder will fail if the system restarts and the network
subnet changes.
2026-03-30 17:22:10 -07:00
J LoganandGitHub e104171f5e Update builder to 0.11.0. (#1369)
- Part of #1295.
- Needed for #1342.
- If APP_ROOT is defined, remove everything but kernel from data
directory before starting integration test.
- Adds `--enable-kernel-install` for system start on integration test.
2026-03-30 15:30:49 -07:00
J LoganandGitHub 4a8a8a6f89 Use Sendable DNS types. (#1269)
- Closes #1268.
- The types we were using weren't very usable with Swift 6 structured
concurrency.
- Implements just the subset of records that we use.
- Use notImplemented instead of formatError for unknown record types.
- Use pure actor for LocalhostDNSHandler now that we have sendable
types.
- Use DNSName as key for table lookups in LocalhostDNSHandler and
HostTableResolver.
- Utilize dot-suffixed domain names everywhere in the lookup chain.
- Huge thanks to @manojmahapatra and @katiewasnothere for their
  diligent and patient review :D
2026-03-19 10:58:28 -07:00
J LoganandGitHub 85ec7ed543 Remove user defaults on userdata uninstall. (#1317)
- Closes #1316.
2026-03-16 17:34:08 -07:00
J LoganandGitHub 50900938c4 Update builder API to use grpc-swift-2. (#1309)
- Closes #1308.
- Applies dependency and code changes similar to
apple/containerization#578.
- Upgrades hawkeye to latest version.
- Update StderrLogHandler not to create a (non-Sendable) Swift time
formatter object for every log message.
2026-03-16 10:33:36 -07:00
J LoganandGitHub ad7f843751 Capture container logs on failed CI runs. (#1285) 2026-03-03 17:39:44 -08:00
J LoganandGitHub 8653507f80 GH actions: do not interpolate template variables in run blocks. (#1284)
- Prevents injection of code during CI build.
2026-03-03 14:13:32 -08:00
J LoganandGitHub 616870b531 Stabilize testBuildNetworkAccess. (#1271)
- Closes #1270.
- The current test is a bit baroque. It tries to run `nc`, either to
`8.8.8.8:53` or a proxy server port if `HTTP_PROXY` is in the
environment. It seems that for an alpine image, a proxy-aware
`Dockerfile` and a `RUN apk install curl` directive is a more natural
test of "network access".
2026-02-26 17:02:13 -08:00
J LoganandGitHub 6bdb647b69 Try to trigger the network privacy alert on port publish. (#1248)
## Motivation and Context
- Closes #1247.
- Hopefully better UX than waiting until clients attempt to access
published ports.
2026-02-25 14:17:09 -08:00
J LoganandGitHub 9f9a7c9a15 Revert "Minimal runtime variant plumbing. (#1239)" (#1255)
- This reverts commit 1942a399e3.
- This approach to getting variant into the runtime helper was fine for
proof of concept work but we need a persistent runtime config file so
that the variant is available for `container start`.
2026-02-23 13:06:27 -08:00
J LoganandGitHub 1942a399e3 Minimal runtime variant plumbing. (#1239)
- Adds plugin variant selection to bootstrap() on the Container API
service in such a way that we can revert the change soon without
compatibility issues when we work out a more permanent approach, and
requires no persistent data migration.
- Restore lexical ordering on ManagementFlags (except `--runtime`, will
take care of that next PR).
- Add a couple plugin loader tests to improve coverage.
2026-02-20 17:48:56 -08:00
J LoganandGitHub a409c0f7dd Add --format option for system status. (#1237)
- Closes #1236.
- As with other resources, default to tabular output, with `--format
json` alternative.
- Also changes common workflow to collect logs even when test step times
out.
2026-02-20 15:18:29 -08:00
J LoganandGitHub d29947121f CI observability enhancements. (#1193)
- Adds a a `--log-root` option to `swift system start`, propagating the
value as `CONTAINER_LOG_ROOT` to services for logging to files instead
of the OS log facility. This is not a "production" capability as it
neither merges nor rotates logs.
- Currently we don't collect logs on CI builds, and we don't have
permission to run the `log` command there. The PR adds `--log-root` to
the CI test phase, archives the results, and uploads the archive as an
artifact.
- Use FilePath from swift-system for the log root. Foundation URL is a
bit of a footgun for filesystem paths, so unless we identify a
showstopper, we should incrementally transition to this type everywhere
except where we really need network URLs.
- Output the hostname of the CI runner at the start of the test phase so
we can identify runner-specific issues where they exist.
- Fix formatting for log messages with multiple metadata items, and fix
unstructured messages on instances that weren't found using `grep -r
'log\.' Sources`.
- Adds command reference documentation for `--log-root`.
2026-02-19 17:47:41 -08:00
J LoganandGitHub 3ad0914fd2 Fix CI integration test coldstart issues. (#1230)
- Closes #1206.
- Closes #1185.
- Closes #507.
- Addresses existing log messages for #642.
- Nondeterministic CI errors are resulting from very slow launch times
for the first runtime helper, which causes ContainersService to be
locked for longer than our 20 sec timeout. Bumping the timeout to 60
seconds addresses this case for now.
- Since many log messages needed to be changed to troubleshoot the
issue, updated all log messages to use structured logging, and
implemented consistent entry/exit logging for all service operations.
- Added logging for ContainerService lock acquisition to help with
finding root cause for the slow service startup.
- Plumbed the `--debug` flag on both `container system start` and
`container system logs` so that the flag is actually useful.
- Updated the `install-init.sh` script so that can install in a custom
app root directory.
2026-02-19 09:58:09 -08:00
J LoganandGitHub 4c800db3fd Fix persistent CI failures. (#1205)
## Type of Change
- [x] Bug fix
- [ ] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
- CI build is failing because runners don't have an /etc/resolver
directory, causing the directory monitor to fail. This occurs while the
install-kernel make target is running, so it appears that kernel
download is failing when it's just that the API server is dying. Created
#1207 for the issue.
- Fixing the initial scan for the directory just moves the problem to
the filesystem watch loop, likely because we're not testing the result
of `open()` for errors.
- Right now the priority is getting CI running and PRs merged, so just
commenting out the realhost DNS server setup.
- Also seeing that under some conditions it can take quite a while for
launchd to start the helper for the default network (8 seconds or more).
With the 10 second health check timeout after API server registration,
this means that some CI runs can exhibit this failure mode. Added a
`--timeout` option to SystemStart and set a 60 second timeout for
install-kernel and integration Makefile targets.
- Fixed a bug where `--debug` was being placed in the wrong location in
the api server startup args.
- Disabled all network CLI tests due to container bootstrap errors when
trying to run the container immediately after creating the network. The
slow network helper launch could be the reason behind the failures that
drove us to serialize these tests. Filed #1206 for this issue.

## Testing
- [x] Tested locally
- [ ] Added/updated tests
- [ ] Added/updated docs
2026-02-13 10:51:27 -08:00
J LoganandGitHub adb3c44754 Don't enable selinux LSM on boot. (#1166)
- Closes #1150.
- The problem seems to be that the selinux label attribute enforcement
doesn't play well with overlayfs.
- Solution is to set the `lsm` boot line argument. The new value
corresponds to what one would see in a Lima VM with Colima. The Kata
kernel we use doesn't provide any of those modules, so now if you run
`dmesg | grep -i lsm` in a container you will just see: `LSM:
initializing lsm=capability`
2026-02-05 20:19:13 -08:00
J LoganandGitHub c4c2e8515b Upgrade kernel to Kata 3.26.0. (#1134)
- Upgrade to containerization 0.24.5 to pick up zstd decompression
enhancement.
- Closes #767.
- Closes #988.
- Closes #1132.
- Requires apple/containerization#508.
2026-02-03 00:27:09 -08:00
J LoganandGitHub b3b5c3e609 Use labels instead of id to discriminate the builtin network. (#1123)
- Closes #1122.
- Adds placeholder ManagedResource and unit tests. Nothing is using
these yet.
- Adds system-defined resource labels for owning plugin and resource
role. The system discriminates the builtin network using role "builtin".
- Adds builtin role when creating builtin network at startup, and
ensures that a preexisting network with ID "default" gets updated with
the role label.
- Replace all network ID checks for "default" with the builtin role
check.
- Adds "builder" role to builder VM.

## Type of Change
- [ ] Bug fix
- [x] New feature  
- [ ] Breaking change
- [ ] Documentation update

## Motivation and Context
Role and owner labels should make cross-cutting resource policy easier
to implement.

## Testing
- [x] Tested locally
- [x] Added/updated tests
- [ ] Added/updated docs
2026-02-02 12:24:27 -08:00
J LoganandGitHub 1c01d0c411 Update to kata 3.20.0 kernel. (#1114)
- Closes #1113.
- This is the newest we can do until we address #767.
- Slight change to PacketFilter error handling so unit tests work more
reliably.
- Try making CLINetworkTests serialized to see if parallel execution is
causing flakes.
2026-01-30 11:07:49 -08:00
J LoganandGitHub d8722708ec Removes ArgumentParser import from NetworkMode. (#1102)
- ContainerResources shouldn't need to know anything about CLI stuff.
- Move ExpressibleByArgument protocol conformance to an extension in the
package where it's needed.
2026-01-28 09:04:58 -08:00
J LoganandGitHub 033c999f5c Make TerminalProgress a library. (#1093)
- Closes #1092.
- Allows 3rd party CLI plugins to use the progress indicator.
2026-01-26 14:07:00 -08:00
J LoganandGitHub 55f211251c Place image store data correctly for app-root path. (#1085)
- Closes #1084.
2026-01-23 11:35:10 -08:00