Skip to content

Hosts parser change#371

Merged
ibauersachs merged 2 commits intomasterfrom
hsots-parser-change
Jun 28, 2025
Merged

Hosts parser change#371
ibauersachs merged 2 commits intomasterfrom
hsots-parser-change

Conversation

@ibauersachs
Copy link
Member

No description provided.

@ibauersachs
Copy link
Member Author

@ivanr-rs can you please verify if these changes work for you?
@tzaeschke is this enough log reduction?

@ibauersachs ibauersachs changed the title Hsots parser change Hosts parser change Jan 19, 2025
@tzaeschke
Copy link

Thanks for looking into this!
I tried it and the original warning has disappeared.
However, I now see a different warning:
[main] WARN org.xbill.DNS.hosts.HostsFileParser - Failed to parse entire hosts file /etc/hosts, address failures=3, name failures=0
It is an improvement in cases where there are multiple of our entries in the /etc/hosts file, otherwise it is just a different log message.
I would still prefer no warning at all, just like the JDK's or OS's own DNS resolver, if possible.

@ibauersachs
Copy link
Member Author

@tzaeschke I know that the log is still there, that was intentional, and I'm still not inclined to remove it. What I was wondering for few days now: why are you writing to /etc/hosts if only your software can parse those records?

@tzaeschke
Copy link

tzaeschke commented Jan 22, 2025

@ibauersachs The central part of our project is a new routing protocol (essentially replacing BGP), see https://www.scion.org/. I am working on a Java client, and there are clients in other languages (Golang, Rust, ...). In the end, many applications on a machine, including possibly the kernel/OS itself, should use the new protocol. We support using a separate hosts file in /etc/scion/hosts, but it would be good to keep using the /etc/hosts, otherwise it may become more or less useless for any addresses outside the local network (local autonomous system), and we end up with two separate configuration files to specify host addresses.
To many, replacing BGP sounds like an impossible undertaking, but several ISPs (including British Telecom and all major Swiss ISPs) now support SCION. Also, the complete Swiss banking network has migrated to SCION. The reference implementations of all components are free open source owned by a non-profit organization.

@ibauersachs ibauersachs force-pushed the hsots-parser-change branch from a966585 to 60029c1 Compare June 28, 2025 15:33
@codecov
Copy link

codecov bot commented Jun 28, 2025

Codecov Report

Attention: Patch coverage is 88.88889% with 7 lines in your changes missing coverage. Please review.

Project coverage is 66.20%. Comparing base (3efb25e) to head (60029c1).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...main/java/org/xbill/DNS/hosts/HostsFileParser.java 88.88% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #371      +/-   ##
============================================
+ Coverage     66.14%   66.20%   +0.05%     
- Complexity     3026     3030       +4     
============================================
  Files           198      198              
  Lines         13544    13590      +46     
  Branches       2109     2114       +5     
============================================
+ Hits           8959     8997      +38     
- Misses         4030     4032       +2     
- Partials        555      561       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

@ibauersachs ibauersachs added this to the v3.6.4 milestone Jun 28, 2025
@ibauersachs ibauersachs merged commit 5609998 into master Jun 28, 2025
27 checks passed
@ibauersachs ibauersachs deleted the hsots-parser-change branch June 28, 2025 16:37
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