t8y2/dbx · error · ValueError
Missing version for native driver
Error message
Missing version for native driver: {driver} What it means
version_agent_artifacts() requires a version string for every driver listed in NATIVE_DRIVERS. If the supplied versions dict lacks an entry for a driver, it raises ValueError naming the missing driver, because the renamed artifact filename must embed the version. This fails fast before any files are renamed with an invalid name.
Solutions
- Populate the versions dict with an entry for the named driver before calling version_agent_artifacts
- Check upstream version-extraction output (e.g. Maven/package metadata) for the missing driver
- Compare the versions dict keys against NATIVE_DRIVERS to find the mismatch/typo
Example fix
// before
version_agent_artifacts(release_dir, {"hive": "1.2.0"}) # zookeeper missing
// after
version_agent_artifacts(release_dir, {"hive": "1.2.0", "zookeeper": "3.9.1", ...}) Defensive patterns
Strategy: validation
Validate before calling
missing = set(NATIVE_DRIVERS) - set(versions)
if missing:
raise ValueError(f"versions missing drivers: {missing}") Try / catch
try:
version_agent_artifacts(release_dir, versions)
except ValueError as e:
fail_build(f"version resolution incomplete: {e}") Prevention
- Assert the versions dict covers NATIVE_DRIVERS before invoking the script
- Log upstream version-extraction output so silent failures are visible
- Add a CI check that fails early when any component version is unresolved
When it happens
Trigger: Calling version_agent_artifacts(release_dir, versions) where versions does not contain a key for one of the NATIVE_DRIVERS (e.g. 'hive', 'zookeeper', 'sqlite-worker').
Common situations: A build step that extracts component versions failed silently and produced an incomplete versions dict; a new native driver added to NATIVE_DRIVERS but not wired into the version-resolution step; typo in the dict key.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- BENCH_CANDIDATES selected no candidates
- BENCH_CANDIDATES selected no candidates
- is required
- is required
- must be a boolean
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/731ca1a09c453731.
Report an issue: GitHub.
Appendix: source
Thrown at agents/scripts/version_agent_artifacts.py:40
raise FileExistsError(f"Versioned agent artifact already exists: {target}")
source.rename(target)
return target
def version_agent_artifacts(release_dir: Path, versions: dict[str, str]) -> list[Path]:
renamed: list[Path] = []
for driver, version in sorted(versions.items()):
jar = rename_artifact(
release_dir / f"dbx-agent-{driver}.jar",
release_dir / f"dbx-agent-{driver}-{version}.jar",
)
if jar:
renamed.append(jar)
for driver in NATIVE_DRIVERS:
version = versions.get(driver)
if not version:
raise ValueError(f"Missing version for native driver: {driver}")
for platform in PLATFORMS:
extension = ".exe" if platform.startswith("windows-") else ""
artifact = rename_artifact(
release_dir / f"dbx-agent-{driver}-{platform}{extension}",
release_dir / f"dbx-agent-{driver}-{version}-{platform}{extension}",
)
if artifact:
renamed.append(artifact)
return renamed
def main() -> None:
parser = argparse.ArgumentParser(description="Add module versions to DBX agent release filenames")
parser.add_argument("release_dir", type=Path)
parser.add_argument("versions_json")
args = parser.parse_args()
versions = json.loads(args.versions_json)View on GitHub (pinned to c0390bff16)