neondatabase/neon · error

config_path_test_only is not set

Error message

config_path_test_only is not set

What it means

The configurator needs a source for the ComputeConfig: either the test-only file path or the control plane URI. Neither params.config_path_test_only nor params.control_plane_uri was set, so there is nothing to fetch configuration from and the configurator errors out. The message names only the test flag, but the actual gap is 'no configuration source at all' (the control_plane_uri branch is the last fallback).

Source

Thrown at compute_tools/src/configurator.rs:97

                            Err(e) => {
                                error!("could not parse config file: {}", e);
                                Err(anyhow::anyhow!("could not parse config file: {}", e))
                            }
                        }
                    } else {
                        error!(
                            "could not open config file at path: {:?}",
                            config_path.to_string_lossy()
                        );
                        Err(anyhow::anyhow!(
                            "could not open config file at path: {}",
                            config_path.to_string_lossy()
                        ))
                    }
                } else if let Some(control_plane_uri) = &compute.params.control_plane_uri {
                    get_config_from_control_plane(control_plane_uri, &compute.params.compute_id)
                } else {
                    Err(anyhow::anyhow!("config_path_test_only is not set"))
                };

            // Parse any received ComputeSpec and transpose the result into a Result<Option<ParsedSpec>>.
            let parsed_spec_result: Result<Option<ParsedSpec>> =
                get_config_result.and_then(|config| {
                    if let Some(spec) = config.spec {
                        if let Ok(pspec) = ParsedSpec::try_from(spec) {
                            Ok(Some(pspec))
                        } else {
                            Err(anyhow::anyhow!("could not parse spec"))
                        }
                    } else {
                        Ok(None)
                    }
                });

            let new_status: ComputeStatus;
            match parsed_spec_result {

View on GitHub (pinned to 8f60b04da4)

Solutions

  1. Pass --control-plane-uri (CONTROL_PLANE_URI) pointing at the HCC/cplane in production
  2. For tests, pass the config file path instead (--config-path-test-only /path/config.json)
  3. Audit the startup script/env to see which of the two arguments is being dropped

Example fix

# before
compute_ctl run --pgdata /data
# after
compute_ctl run --pgdata /data --control-plane-uri https://console.example.com/control-plane
Defensive patterns

Strategy: validation

Validate before calling

// Boot-time assertion of the config source
if params.config_path_test_only.is_none() && params.control_plane_uri.is_none() {
    anyhow::bail!("must pass either --control-plane-uri or --config-path-test-only");
}

Type guard

fn has_config_source(params: &ComputeParams) -> bool {
    params.config_path_test_only.is_some() || params.control_plane_uri.is_some()
}

Prevention

When it happens

Trigger: compute_ctl launched with neither --control-plane-uri nor the test config path; e.g. a stripped-down dev invocation or a startup script that silently dropped arguments.

Common situations: Local experiments invoking compute_ctl run without the cplane URL; env var for the control plane unset so the arg defaulted to None; wrapper scripts losing arguments on refactor.

Related errors


AI-assisted analysis of neondatabase/neon@8f60b04da4 (2026-08-16). Data as JSON: /api/errors/2918cc27a46b9f02. Report an issue: GitHub.