jdx/mise · error

unexpected compose config hash row

Error message

unexpected compose config hash row: {line}

What it means

Thrown while parsing the output of a compose config-hash listing: each line is expected to contain exactly two whitespace-separated fields (service and hash). A line with a third (or more) field means the output format differs from what the parser expects, so parsing is aborted rather than guessing.

Solutions

  1. Check the docker compose version and align it with the version the tool expects
  2. Print the raw command output and inspect the offending line's field layout
  3. Adjust the parsing/normalization or pin a compatible compose binary version

Example fix

// before: row 'web <hash> extra' -> bail
// after: ensure `docker compose config --format json` or a compatible compose version is used
Defensive patterns

Strategy: validation

Validate before calling

let line = "web abc123";
let fields: Vec<&str> = line.split_whitespace().collect();
let ok = fields.len() == 2;
assert!(ok, "config hash rows must have exactly 2 fields, got {}", fields.len());

Prevention

When it happens

Trigger: Calling the function that collects compose config hashes when `docker compose config` (or equivalent) emits rows with extra columns — typically due to a docker-compose version whose output format changed.

Common situations: Upgrading or downgrading docker compose so the tabular config output gains extra fields; custom output formatting or plugins altering row shape.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/449deca4d19b34a1. Report an issue: GitHub.

Appendix: source

Thrown at src/system/compose.rs:1033

        .filter(|line| !line.trim().is_empty())
        .map(|line| Ok(serde_json::from_str(line)?))
        .collect()
}

fn parse_config_hashes(output: &str) -> Result<HashMap<String, String>> {
    output
        .lines()
        .filter(|line| !line.trim().is_empty())
        .map(|line| {
            let mut fields = line.split_whitespace();
            let service = fields
                .next()
                .ok_or_else(|| eyre!("compose config hash row is missing a service"))?;
            let hash = fields.next().ok_or_else(|| {
                eyre!("compose config hash row for '{service}' is missing a hash")
            })?;
            if fields.next().is_some() {
                bail!("unexpected compose config hash row: {line}");
            }
            Ok((service.to_string(), hash.to_string()))
        })
        .collect()
}

fn container_is_ready(container: &ComposeContainer) -> bool {
    container.state == "running" && matches!(container.health.as_str(), "" | "healthy")
}

fn container_is_active(container: &ComposeContainer) -> bool {
    matches!(
        container.state.as_str(),
        "running" | "restarting" | "paused"
    )
}

fn describe_current(target_services: &IndexSet<String>, containers: &[ComposeContainer]) -> String {

View on GitHub (pinned to 533346cc37)