Skip to content

Commit 43efcb8

Browse files
committed
Warn on aut-num replication failure instead of failing hard
1 parent d76907e commit 43efcb8

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Local config (use config.example.yaml as template)
22
config.yaml
3+
config.test.yaml
34

45
# Byte-compiled / optimized / DLL files
56
__pycache__/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ uv run rir-updater config.yaml --setup-test
7979

8080
The first time you use `--setup-test`, the mntner must be created manually via the RIPE web UI at [apps-test.db.ripe.net](https://apps-test.db.ripe.net) — the API does not allow creating the first mntner programmatically due to a circular person↔mntner dependency. The tool will print instructions if the mntner is not found.
8181

82-
ASNs registered outside RIPE (e.g. ARIN/APNIC) cannot be automatically replicated and must be created manually in the test DB. `--setup-test` will warn when this is required.
82+
aut-num objects cannot be created in the test DB via the API — all aut-nums require authorization from `TEST-DBM-MNT`, which is restricted to RIPE staff. `--setup-test` will warn and continue if aut-num replication fails. You must create the aut-num manually via the web UI using your SSO session; however this may also fail if your account is not authorized as `TEST-DBM-MNT`. In practice, the test DB is most useful for validating mntner/person setup and dry-run output rather than full end-to-end route sync.
8383

8484
`--setup-test` only replicates prerequisite objects. Run without `--setup-test` afterwards to sync route objects and ROAs.
8585

src/rir_updater/ripe/client.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,14 @@ def setup_test_env(self, routes: list[RouteObject], sso_emails: list[str]) -> No
255255
print(f"{result}: mntner {self._maintainer}")
256256

257257
for asn in sorted(asns):
258-
result = self._replicate_object("aut-num", asn)
258+
try:
259+
result = self._replicate_object("aut-num", asn)
260+
except ApiError:
261+
print(
262+
f"warning: aut-num {asn} could not be created in test "
263+
f"(requires TEST-DBM-MNT auth — create it manually via the web UI)"
264+
)
265+
continue
259266
if result == "not-found":
260267
print(
261268
f"warning: aut-num {asn} not found in RIPE production "

0 commit comments

Comments
 (0)