t8y2/dbx · error · ValueError

BENCH_CANDIDATES selected no candidates

Error message

BENCH_CANDIDATES selected no candidates

What it means

configured_candidates builds the candidate list from BENCH_CANDIDATES (go/java/jdbc tokens); if parsing produces an empty list it raises ValueError because the benchmark has nothing to compare. This is a pure configuration error caught at startup.

Source

Thrown at agents/drivers/argo-go/bench/agent_compare.py:307

        artifact = required_path("GO_AGENT")
        raw_command = os.getenv("GO_AGENT_COMMAND", "")
        command = shlex.split(raw_command) if raw_command else [str(artifact)]
        candidates.append(
            Candidate("go-native", command, artifact, os.getenv("GO_RSS_COMMAND", ""))
        )
    if "jdbc" in selected:
        artifact = required_path("JDBC_AGENT_JAR")
        raw_command = os.getenv("JDBC_AGENT_COMMAND", "")
        command = (
            shlex.split(raw_command)
            if raw_command
            else [env_default("JAVA_BIN", "java"), "-jar", str(artifact)]
        )
        candidates.append(
            Candidate("jdbc-java", command, artifact, os.getenv("JDBC_RSS_COMMAND", ""))
        )
    if not candidates:
        raise ValueError("BENCH_CANDIDATES selected no candidates")
    return candidates


def connection_params() -> dict:
    return {
        "host": env_default("HIVE_HOST", "127.0.0.1"),
        "port": env_int("HIVE_PORT", 10000),
        "database": env_default("HIVE_DATABASE", "dbx_agent_bench"),
        "username": os.getenv("HIVE_USERNAME", ""),
        "password": os.getenv("HIVE_PASSWORD", ""),
        "url_params": env_default("HIVE_URL_PARAMS", "auth=noSasl"),
        "connection_string": os.getenv("HIVE_CONNECTION_STRING", ""),
        "ssl": env_bool("HIVE_SSL", False),
        "ca_cert_path": os.getenv("HIVE_CA_CERT_PATH", ""),
        "client_cert_path": os.getenv("HIVE_CLIENT_CERT_PATH", ""),
        "client_key_path": os.getenv("HIVE_CLIENT_KEY_PATH", ""),
        "connect_timeout_secs": env_int("HIVE_CONNECT_TIMEOUT", 30),
    }

View on GitHub (pinned to c0390bff16)

Solutions

  1. Export BENCH_CANDIDATES with valid tokens (e.g. `export BENCH_CANDIDATES=go,java,jdbc-java`)
  2. Check the parsing logic in configured_candidates for the exact accepted token names and use one of them
  3. Set the required env vars (artifact paths via required_path) so the candidate branches actually append entries
  4. Add a startup check or help text listing valid BENCH_CANDIDATES values

Example fix

// before
BENCH_CANDIDATES= ./agent_compare.py
// after
export BENCH_CANDIDATES="go,jdbc-java"
python3 agents/drivers/argo-go/bench/agent_compare.py
Defensive patterns

Strategy: validation

Validate before calling

candidates = os.getenv("BENCH_CANDIDATES", "")
if not candidates:
    raise SystemExit("Set BENCH_CANDIDATES, e.g. export BENCH_CANDIDATES=go,jdbc-java")

Try / catch

try:
    cands = configured_candidates()
except ValueError as e:
    sys.exit(f"config error: {e}; valid values: go,java,jdbc-java")

Prevention

When it happens

Trigger: Running main() with BENCH_CANDIDATES unset/empty or containing only unrecognized tokens, so no Candidate entries (including the jdbc-java entry gated on its artifact) are appended.

Common situations: Forgot to export BENCH_CANDIDATES before running the bench; typo like "golang" or "rust" instead of the expected token; candidates list intentionally limited to an artifact that doesn't exist so the branch appending it never ran.

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/ff3add715917c75d. Report an issue: GitHub.