t8y2/dbx · error · FileNotFoundError

Native agent artifact missing for {driver_name}/{platform}:

Error message

Native agent artifact missing for {driver_name}/{platform}: {source}

What it means

For each native artifact of a driver, build_driver_zips looks for the file named by artifact_filename(artifact['url']) inside release_dir and raises FileNotFoundError naming driver, platform, and path if it's missing. Native binaries are platform-specific, so each declared platform must have its binary present before packaging.

Source

Thrown at agents/scripts/build_driver_zips.py:95

                raise FileNotFoundError(f"Java agent artifact missing for {driver_name}: {source}")

            package_driver = copy.deepcopy(driver)
            package_driver.pop("native", None)
            package_driver["jar"] = packaged_artifact(jar_artifact, source)
            package_registry = {"jres": {}, "drivers": {driver_name: package_driver}}
            output = release_dir / f"dbx-agent-{driver_name}-{version}.tar.zst"
            if not output.exists():
                write_driver_tar_zstd(output, package_registry, source, executable=False)
            elif not output.is_file():
                raise FileExistsError(f"Reusable Java agent package is not a file: {output}")
            update_release_artifact(jar_artifact, output)
            outputs.append(output)

        for platform, artifact in driver.get("native", {}).items():
            filename = artifact_filename(artifact["url"])
            source = release_dir / filename
            if not source.is_file():
                raise FileNotFoundError(f"Native agent artifact missing for {driver_name}/{platform}: {source}")

            package_driver = copy.deepcopy(driver)
            package_driver.pop("jar", None)
            package_driver["native"] = {platform: packaged_artifact(artifact, source)}
            package_registry = {"jres": {}, "drivers": {driver_name: package_driver}}
            output = release_dir / f"dbx-agent-{driver_name}-{version}-{platform}.tar.zst"
            if not output.exists():
                write_driver_tar_zstd(output, package_registry, source, executable=True)
            elif not output.is_file():
                raise FileExistsError(f"Reusable native agent package is not a file: {output}")
            update_release_artifact(artifact, output)
            outputs.append(output)

    registry_path.write_text(json.dumps(registry, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
    return outputs


def remove_raw_driver_artifacts(release_dir: Path) -> list[Path]:

View on GitHub (pinned to c0390bff16)

Solutions

  1. Download the missing native binary for the named platform into release_dir with the URL-derived filename.
  2. Re-run the full artifact download step covering every platform in the registry.
  3. Remove the platform from the registry if it's no longer supported, or skip drivers you can't package.
  4. Diff artifact_filename(artifact['url']) outputs against `ls release_dir` to find mismatches.

Example fix

# before
release_dir contains only dbx-agent-foo-1.0.0-linux-x86_64 binary
# after
download windows-amd64 binary to release_dir, then rerun build_driver_zips.py
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path
from build_driver_zips import artifact_filename
missing = [(n, p, a) for n, d in registry["drivers"].items()
           for p, a in d.get("native", {}).items()
           if not (Path("out") / artifact_filename(a["url"])).is_file()]
if missing:
    raise SystemExit(f"missing native artifacts: {missing}")

Try / catch

try:
    build_driver_zips(release_dir)
except FileNotFoundError as e:
    print(f"incomplete native release: {e}; download all platform binaries")

Prevention

When it happens

Trigger: A driver's registry entry declares native artifacts for one or more platforms, but the corresponding downloaded binary is absent from release_dir — e.g. only linux-x86_64 was downloaded while windows-amd64 is also declared, or the URL-derived filename doesn't match the local file.

Common situations: Partial artifact download skipping some platforms; registry updated to add a new platform before artifacts were built; filename convention change in artifact_filename; running packaging on a machine that synced only some binaries.

Related errors


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