Move to TOML configuration for defaults (#1425)

- Discussion topic #1336.
- This change migrates away from using `UserDefaults`,
  instead providing a TOML configuration mechanism for
  user configurable settings. All existing system property
  settings keys are supported in the new configuration
  file. However, users will have to migrate any settings
  they have configured in the `UserDefaults` into TOML
  for these settings to take effect.
- Breaking changes:
  * `container system property get` is removed in favor of
    users directly utilizing `container system property list --format toml | jq<>`.
  * `container system property set` is removed since the TOML
    configuration is effectively immutable during the lifetime of the
    `container` daemon. Uses can edit the TOML they have in their home
    directory, however no changes will take effect until the daemon is
    restarted via `container system stop && container system start`
* `container system property list --format table` is removed as
    generating tabular format is non-trivial and the new TOML format is
    intended to be human readable
This commit is contained in:
Noah Thornton
2026-05-04 12:04:24 -07:00
committed by GitHub
parent 8a25213190
commit e3c49803a0
56 changed files with 1168 additions and 971 deletions
@@ -16,6 +16,8 @@
import ArgumentParser
import ContainerAPIClient
import ContainerPersistence
import ContainerPlugin
import ContainerResource
import ContainerizationError
import Foundation
@@ -54,6 +56,9 @@ extension Application {
var arguments: [String] = []
public func run() async throws {
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
)
let progressConfig = try ProgressConfig(
showTasks: true,
showItems: true,
@@ -78,6 +83,7 @@ extension Application {
resource: resourceFlags,
registry: registryFlags,
imageFetch: imageFetchFlags,
containerSystemConfig: containerSystemConfig,
progressUpdate: progress.handler,
log: log
)
@@ -16,6 +16,8 @@
import ArgumentParser
import ContainerAPIClient
import ContainerPersistence
import ContainerPlugin
import ContainerResource
import Containerization
import ContainerizationError
@@ -61,6 +63,9 @@ extension Application {
var arguments: [String] = []
public func run() async throws {
let containerSystemConfig: ContainerSystemConfig = try SystemRuntimeOptions.loadConfig(
configFile: SystemRuntimeOptions.configFileFromAppRoot(ApplicationRoot.url)
)
var exitCode: Int32 = 127
let id = Utility.createContainerID(name: self.managementFlags.name)
@@ -98,6 +103,7 @@ extension Application {
resource: resourceFlags,
registry: registryFlags,
imageFetch: imageFetchFlags,
containerSystemConfig: containerSystemConfig,
progressUpdate: progress.handler,
log: log
)