fix(configuration): require containers.image instead of a private-registry default (#2054)
applyContainerDefaults no longer fills containers.image with a hard-coded private-registry reference. An unset image now fails configuration validation with 'containers.image is required for autonomous workflow workers', so a fresh instance is told at startup (and via the readiness probe at runtime) instead of at the first failed container pull. Configs that relied on the default now set it explicitly: dev.toml (the local task image:agent build, which e2e also overlays), plus commented [containers] blocks in config.example.toml and standalone.toml. The deploy docs no longer describe a code-level default.
This commit is contained in:
7 files changed
+45
-17
No files matched your search
@@ -734,7 +734,9 @@ type OpenShellConfig struct {
|
||||
|
||||
// ContainerConfig configures Docker sandbox execution of archie-agent.
|
||||
type ContainerConfig struct {
|
||||
// Image is the Docker image to run (e.g. "git.catlow.cloud/sam/archie-agent:latest").
|
||||
// Image is the Docker image task workers run (e.g. "registry.example.com/archie/archie-agent:v1").
|
||||
// There is no default: validation requires it so a fresh instance is told
|
||||
// at startup rather than at the first failed pull.
|
||||
Image string `toml:"image" yaml:"image"`
|
||||
// MaxConcurrency limits simultaneous daemon tasks and containers.
|
||||
// Tasks from the same repository remain serialized. 0 = no limit.
|
||||
|
||||
@@ -26,7 +26,6 @@ const (
|
||||
defaultContainerUptime = 5 * time.Hour
|
||||
defaultVolumeTTL = 72 * time.Hour
|
||||
defaultPullPolicy = "missing"
|
||||
defaultContainerImage = "git.catlow.cloud/sam/archie-agent:latest"
|
||||
|
||||
// defaultMaxResultChars bounds one tool result.
|
||||
defaultMaxResultChars = 50_000
|
||||
@@ -322,12 +321,11 @@ func DefaultBotEmail(forgeType, user, email string) string {
|
||||
return email
|
||||
}
|
||||
|
||||
// applyContainerDefaults makes managed task workers usable without an explicit
|
||||
// [containers] section. A negative VolumeTTL is left for validation to reject.
|
||||
// applyContainerDefaults fills the optional [containers] values. There is
|
||||
// deliberately no default image: validateContainers reports a missing
|
||||
// containers.image at startup instead of pointing task workers at one
|
||||
// registry. A negative VolumeTTL is left for validation to reject.
|
||||
func applyContainerDefaults(cfg *config.Config) {
|
||||
if cfg.Containers.Image == "" {
|
||||
cfg.Containers.Image = defaultContainerImage
|
||||
}
|
||||
if cfg.Containers.MaxUptime == 0 {
|
||||
cfg.Containers.MaxUptime = config.Duration(defaultContainerUptime)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user