{"record":{"id":"09cf2e2064019047","repo":"t8y2/dbx","slug":"bench-candidates-selected-no-candidates-09cf2e","errorCode":null,"errorMessage":"BENCH_CANDIDATES selected no candidates","messagePattern":"BENCH_CANDIDATES selected no candidates","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/bench/agent_compare.py","lineNumber":307,"sourceCode":"        artifact = required_path(\"GO_AGENT\")\n        raw_command = os.getenv(\"GO_AGENT_COMMAND\", \"\")\n        command = shlex.split(raw_command) if raw_command else [str(artifact)]\n        candidates.append(\n            Candidate(\"go-native\", command, artifact, os.getenv(\"GO_RSS_COMMAND\", \"\"))\n        )\n    if \"jdbc\" in selected:\n        artifact = required_path(\"JDBC_AGENT_JAR\")\n        raw_command = os.getenv(\"JDBC_AGENT_COMMAND\", \"\")\n        command = (\n            shlex.split(raw_command)\n            if raw_command\n            else [env_default(\"JAVA_BIN\", \"java\"), \"-jar\", str(artifact)]\n        )\n        candidates.append(\n            Candidate(\"jdbc-java\", command, artifact, os.getenv(\"JDBC_RSS_COMMAND\", \"\"))\n        )\n    if not candidates:\n        raise ValueError(\"BENCH_CANDIDATES selected no candidates\")\n    return candidates\n\n\ndef connection_params() -> dict:\n    return {\n        \"host\": env_default(\"HIVE_HOST\", \"127.0.0.1\"),\n        \"port\": env_int(\"HIVE_PORT\", 10000),\n        \"database\": env_default(\"HIVE_DATABASE\", \"dbx_agent_bench\"),\n        \"username\": os.getenv(\"HIVE_USERNAME\", \"\"),\n        \"password\": os.getenv(\"HIVE_PASSWORD\", \"\"),\n        \"url_params\": env_default(\"HIVE_URL_PARAMS\", \"auth=noSasl\"),\n        \"connection_string\": os.getenv(\"HIVE_CONNECTION_STRING\", \"\"),\n        \"ssl\": env_bool(\"HIVE_SSL\", False),\n        \"ca_cert_path\": os.getenv(\"HIVE_CA_CERT_PATH\", \"\"),\n        \"client_cert_path\": os.getenv(\"HIVE_CLIENT_CERT_PATH\", \"\"),\n        \"client_key_path\": os.getenv(\"HIVE_CLIENT_KEY_PATH\", \"\"),\n        \"connect_timeout_secs\": env_int(\"HIVE_CONNECT_TIMEOUT\", 30),\n    }","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/bench/agent_compare.py#L289-L325","documentation":"configured_candidates() builds the list of candidate agents to benchmark based on BENCH_CANDIDATES and raises ValueError if the selection ends up empty. The harness needs at least one agent to compare; running with zero candidates would produce meaningless results, so it fails fast.","triggerScenarios":"BENCH_CANDIDATES set to an empty string, whitespace, or only names that don't match any known candidate type (e.g. a typo like 'hive-go-agents'), or set to a name whose required artifact (jar/binary) isn't present so it's skipped.","commonSituations":"CI config exporting BENCH_CANDIDATES=\"\" by default; renaming candidate ids in config without updating the env var; filtering out all candidates because prerequisite build artifacts (jar) are missing on the machine.","solutions":["Set BENCH_CANDIDATES to at least one valid candidate id, e.g. export BENCH_CANDIDATES=hive-go","Unset BENCH_CANDIDATES to use the harness default selection","Verify spelling against the candidate ids recognized by the script","Build the prerequisite artifacts so a listed candidate isn't skipped"],"exampleFix":"// before\nexport BENCH_CANDIDATES=\"\"\n// after\nexport BENCH_CANDIDATES=hive-go,jdbc-java","handlingStrategy":"validation","validationCode":"import os\nVALID = {\"hive-go\", \"jdbc-java\"}  # ids known to the harness\nsel = [c for c in os.getenv(\"BENCH_CANDIDATES\", \"\").split(\",\") if c.strip()]\nif not sel:\n    raise SystemExit(\"BENCH_CANDIDATES must list at least one candidate\")\nunknown = set(sel) - VALID\nif unknown:\n    raise SystemExit(f\"unknown candidates: {unknown}\")","typeGuard":null,"tryCatchPattern":"try:\n    candidates = configured_candidates()\nexcept ValueError as e:\n    if \"selected no candidates\" in str(e):\n        os.environ[\"BENCH_CANDIDATES\"] = \"hive-go\"\n        candidates = configured_candidates()\n    else:\n        raise","preventionTips":["Export BENCH_CANDIDATES explicitly in CI config, never empty","Keep candidate id lists in one place and reference them from CI","Validate the selection at pipeline start before long setup steps","Build all candidate artifacts as a prerequisite job step"],"tags":["python","configuration","environment-variables","empty-selection"],"backgroundTag":"missing-env-var","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}