Keep the AS list when the asupdate generator fails (closes #173)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
make asupdate piped the generator into gzip, so the target saw gzip's exit status. A failed download replaced pkg/asinfo/asdata.json.gz with an empty file and the target still exited 0. The target now runs the new script/asupdate. It writes the output of cmd/asinfo-gen to a temporary file. Only when the generator succeeds does it compress the list and move it into place. Otherwise it leaves the file alone and exits non-zero. The generator now fails when as.csv holds no AS. The generator reads as.csv from ipverse/as-metadata, the source's new name. The list it builds there is unchanged, so no new list is committed. Model: opus-5-5
This commit was merged in pull request #176.
This commit is contained in:
@@ -52,7 +52,6 @@ clean:
|
||||
run: build
|
||||
DEBUG=routewatch ./bin/routewatch 2>&1 | tee log.txt
|
||||
|
||||
# Rebuild the AS list built into RouteWatch from as.csv (needs the network).
|
||||
asupdate:
|
||||
@echo "Updating AS info data..."
|
||||
@go run cmd/asinfo-gen/main.go | gzip > pkg/asinfo/asdata.json.gz.tmp && \
|
||||
mv pkg/asinfo/asdata.json.gz.tmp pkg/asinfo/asdata.json.gz
|
||||
@script/asupdate
|
||||
|
||||
Reference in New Issue
Block a user