jdx/mise · error · eyre::Report

bootstrap compose project '{name}' renew_anonymous_volumes r

Error message

bootstrap compose project '{name}' renew_anonymous_volumes requires state = "running"

What it means

`renew_anonymous_volumes` maps to `docker compose up --renew-anon-volumes`, an up-time flag that recreates containers' anonymous volumes. It is meaningless for a project being removed, so `ComposeRequest::from_toml` rejects it unless `state = "running"`.

Source

Thrown at src/system/compose.rs:305

            bail!(
                "bootstrap compose project '{name}' services cannot be combined with state = \"absent\" because compose down removes the entire project"
            );
        }
        if !config.wait && config.wait_timeout.is_some() {
            bail!("bootstrap compose project '{name}' wait_timeout requires wait = true");
        }
        if config.wait_timeout == Some(0) {
            bail!("bootstrap compose project '{name}' wait_timeout must be greater than zero");
        }
        if config.state != ComposeState::Absent
            && (config.down_volumes || config.down_images.is_some())
        {
            bail!(
                "bootstrap compose project '{name}' down_volumes and down_images require state = \"absent\""
            );
        }
        if config.state != ComposeState::Running && config.renew_anonymous_volumes {
            bail!(
                "bootstrap compose project '{name}' renew_anonymous_volumes requires state = \"running\""
            );
        }
        let explicit_dependencies = config
            .depends_on
            .iter()
            .map(|dependency| parse_dependency(dependency))
            .collect::<Result<Vec<_>>>()?;
        let services = dedupe(config.services);
        let oneshot: IndexSet<String> = dedupe(config.oneshot).into_iter().collect();
        if !services.is_empty() && oneshot.iter().any(|service| !services.contains(service)) {
            bail!(
                "bootstrap compose project '{name}' oneshot services must also appear in services"
            );
        }
        let files = resolve_paths(&config.project_dir, config.files);
        let env_files = resolve_paths(&config.project_dir, config.env_files);
        let path_dependencies = std::iter::once(ResourceId::new(

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Set `state = "running"` on the table that uses `renew_anonymous_volumes`.
  2. Or remove the flag if you do not need anonymous-volume recreation on every converge.

Example fix

# before
[bootstrap.compose.web]
project_dir = "/srv/web"
state = "absent"
renew_anonymous_volumes = true

# after
[bootstrap.compose.web]
project_dir = "/srv/web"
state = "running"
renew_anonymous_volumes = true
Defensive patterns

Strategy: validation

Validate before calling

if cfg.renew_anonymous_volumes {
    assert!(cfg.state == ComposeState::Running,
        "renew_anonymous_volumes requires state = running");
}

Prevention

When it happens

Trigger: A compose table sets `renew_anonymous_volumes = true` while `state` is `"present"`/`"absent"` (anything other than `"running"`).

Common situations: Adding the flag to force fresh volumes while debugging, but the table's state was changed (or copied from a teardown block); misunderstanding 'present' as 'running'.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/25a78c8e037f4486. Report an issue: GitHub.