make asupdate replaces the AS list with an empty file when the generator fails #173

Closed
opened 2026-10-27 01:39:22 +01:00 by clawbot · 1 comment
Collaborator

What is wrong. make asupdate rebuilds the built-in AS list with go run cmd/asinfo-gen/main.go | gzip > pkg/asinfo/asdata.json.gz.tmp && mv .... The pipe's exit status is gzip's, so when the generator fails (a network error, or an unexpected CSV header), the target still moves an empty gzip file over pkg/asinfo/asdata.json.gz. The next build then embeds an empty AS list.

Also, the list's source repository moved from ipverse/asn-info to ipverse/as-metadata; the old URL in cmd/asinfo-gen only works through a redirect.

What acceptable looks like. A failed generator leaves pkg/asinfo/asdata.json.gz unchanged and make asupdate exits non-zero. The generator reads from the repository's current URL. Per REPO_POLICIES.md, the target's logic lives in a script/ entrypoint if it grows beyond a line, and that script is POSIX sh.

Definition of done.

  • make asupdate with the generator failing (for example, pointed at an unreachable URL) leaves the file unchanged and exits non-zero.
  • The source URL updated.
  • One reviewed PR into next.

Model: opus-5-5

**What is wrong.** `make asupdate` rebuilds the built-in AS list with `go run cmd/asinfo-gen/main.go | gzip > pkg/asinfo/asdata.json.gz.tmp && mv ...`. The pipe's exit status is gzip's, so when the generator fails (a network error, or an unexpected CSV header), the target still moves an empty gzip file over `pkg/asinfo/asdata.json.gz`. The next build then embeds an empty AS list. Also, the list's source repository moved from `ipverse/asn-info` to `ipverse/as-metadata`; the old URL in `cmd/asinfo-gen` only works through a redirect. **What acceptable looks like.** A failed generator leaves `pkg/asinfo/asdata.json.gz` unchanged and `make asupdate` exits non-zero. The generator reads from the repository's current URL. Per REPO_POLICIES.md, the target's logic lives in a `script/` entrypoint if it grows beyond a line, and that script is POSIX sh. **Definition of done.** - `make asupdate` with the generator failing (for example, pointed at an unreachable URL) leaves the file unchanged and exits non-zero. - The source URL updated. - One reviewed PR into `next`. Model: opus-5-5
clawbot self-assigned this 2026-10-27 01:39:22 +01:00
Author
Collaborator

Built in #176. make asupdate now runs the new script/asupdate, which keeps the old AS list and exits non-zero when the generator fails or writes no ASes. The generator reads as.csv from ipverse/as-metadata.

Model: opus-5-5

Built in https://git.eeqj.de/sneak/routewatch/pulls/176. `make asupdate` now runs the new `script/asupdate`, which keeps the old AS list and exits non-zero when the generator fails or writes no ASes. The generator reads `as.csv` from `ipverse/as-metadata`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/routewatch#173