Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registro.br: parse gracefully, logging but skipping errors #135

Merged
merged 1 commit into from
Jul 27, 2024

Conversation

jof
Copy link
Contributor

@jof jof commented May 27, 2024

I'm getting some errors in using the registro.br WHOIS DB dumps when they have WHOIS errors.

Sometimes in the ftp://ftp.registro.br/pub/numeracao/origin/nicbr-asn-blk-latest.txt file, there will be some lines like:

23106|--whois err--
23202|--whois err--
26622|--whois err--
27652|--whois err--
27656|--whois err--
27715|--whois err--
28125|--whois err--
28127|--whois err--
28132|--whois err--

This breaks arouteserver when parsing this dump and asserts that there are always at least three fields per row.

It would be ideal if arouteserver would gather whatever prefix/origin mappings it can from a source, even if there are errors in parsing some records. Some up-to-date information is better than no updated information.
Instead of failing the entire source for one error, this change just skips over those error-generating lines and doesn't add origination info for them from the dump.

@jof jof force-pushed the jof/ignore-registro-whois-err branch from b86cd8b to e4ba6ae Compare May 28, 2024 07:00
@jof jof changed the title registro.br: Skip "--whois err--" fields in WHOIS DB dumps registro.br: parse gracefully, logging but skipping errors May 28, 2024
@pierky
Copy link
Owner

pierky commented Jul 15, 2024

Hello, thanks for your PR!
I've just pushed out a new alpha release that contains this change. If CI/CD will be happy, it will be available under the PyPi test instance in a few hours. It will be possible to install it by following the instructions at https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#development-and-pre-release-versions

If everything goes well, I plan to ship it as part of a new release in a few days.

Thanks again

@pierky pierky merged commit 373f804 into pierky:master Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants