t8y2/dbx · error · FileNotFoundError
Java agent artifact missing for {driver_name}: {source}
Error message
Java agent artifact missing for {driver_name}: {source} What it means
build_driver_zips packages a release registry's Java agent JARs into tar.zst packages. For each driver with a jar artifact it computes the expected filename from the artifact URL and checks the file exists in release_dir; if not it raises FileNotFoundError naming the driver and path. This catches incomplete release downloads before packaging half-built archives.
Source
Thrown at agents/scripts/build_driver_zips.py:77
artifact["url"] = release_url_with_filename(artifact["url"], output.name)
artifact["size"] = output.stat().st_size
artifact["sha256"] = hashlib.sha256(output.read_bytes()).hexdigest()
artifact["format"] = "tar_zstd"
def build_driver_zips(release_dir: Path) -> list[Path]:
registry_path = release_dir / "agent-registry.json"
registry = json.loads(registry_path.read_text(encoding="utf-8"))
outputs: list[Path] = []
for driver_name, driver in registry.get("drivers", {}).items():
version = driver["version"]
jar_artifact = driver.get("jar")
if jar_artifact and jar_artifact.get("size", 0) > 0:
filename = artifact_filename(jar_artifact["url"])
source = release_dir / filename
if not source.is_file():
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}")View on GitHub (pinned to c0390bff16)
Solutions
- Download the missing JAR into release_dir with exactly the name derived from the artifact URL.
- Re-run the release download step so all jar artifacts referenced by the registry are fetched.
- Compare artifact_filename(jar_artifact['url']) against the files present in release_dir to spot name mismatches.
- Ensure release_dir points at the directory that actually contains the downloaded release.
Example fix
# before python build_driver_zips.py --release-dir out # jar never downloaded # after fetch-artifacts --release-dir out && python build_driver_zips.py --release-dir out
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
release_dir = Path("out")
from build_driver_zips import artifact_filename
missing = [n for n, d in registry["drivers"].items()
if d.get("jar", {}).get("size", 0) > 0
and not (release_dir / artifact_filename(d["jar"]["url"])).is_file()]
if missing:
raise SystemExit(f"missing jar artifacts for: {missing}") Try / catch
try:
build_driver_zips(release_dir)
except FileNotFoundError as e:
print(f"incomplete release: {e}; re-run artifact download") Prevention
- Always run the full artifact download before packaging
- Verify downloaded file names match artifact_filename(url)
- Checksum artifacts after download
- Keep registry URLs and local files in sync
When it happens
Trigger: Running build_driver_zips when a driver's registry entry declares a jar (size > 0) but the corresponding file (release_dir / artifact_filename(jar_artifact['url'])) is absent — e.g. the release dir only has some artifacts, or the URL-derived filename changed.
Common situations: Partial release download; artifact URL updated in the registry but the local file kept its old name; clean release_dir without re-downloading; typo'd version in registry producing a filename that was never fetched.
Related errors
- Native agent artifact missing for {driver_name}/{platform}:
- {path}
- FileNotFoundError(path)
- Reusable Java agent package is not a file: {output}
- Reusable native agent package is not a file: {output}
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/f3a0651e1ba2dfdd.
Report an issue: GitHub.