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

Fix loop over targets of all hosts #193

Merged
merged 3 commits into from
Jan 18, 2024
Merged

Conversation

s-diez
Copy link
Contributor

@s-diez s-diez commented Jan 15, 2024

Hi,

the refactor commit e88b79f contains an error and only iterates over the targets of the first resolved hostname. This can easily be tested with make run-dev. I hope the somewhat larger refactoring is fine with you.

@till
Copy link
Contributor

till commented Jan 16, 2024

Thanks for the contribution, can you check the linter? I'll test it this week as well.

@s-diez
Copy link
Contributor Author

s-diez commented Jan 16, 2024

The linter should be fixed now.

@till
Copy link
Contributor

till commented Jan 16, 2024

@s-diez so the problem was if you add multiple targets, it would only check the first host?

@s-diez
Copy link
Contributor Author

s-diez commented Jan 16, 2024

@s-diez so the problem was if you add multiple targets, it would only check the first host?

Exactly. These are the metrics from make run-dev

Current main branch:

luzilla_rbls_ips_blacklisted{hostname="smtp.gmail.com",ip="142.250.27.109",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.gmail.com",ip="142.250.27.109",rbl="zen.spamhaus.org"} 0

With my changes:

luzilla_rbls_ips_blacklisted{hostname="mail.gmx.net",ip="212.227.17.168",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.gmx.net",ip="212.227.17.168",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.gmx.net",ip="212.227.17.190",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.gmx.net",ip="212.227.17.190",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.messagingengine.com",ip="103.168.172.36",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.messagingengine.com",ip="103.168.172.36",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.messagingengine.com",ip="103.168.172.51",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="mail.messagingengine.com",ip="103.168.172.51",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.fastmail.com",ip="103.168.172.45",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.fastmail.com",ip="103.168.172.45",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.fastmail.com",ip="103.168.172.60",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.fastmail.com",ip="103.168.172.60",rbl="zen.spamhaus.org"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.gmail.com",ip="142.250.27.109",rbl="ix.dnsbl.manitu.net"} 0
luzilla_rbls_ips_blacklisted{hostname="smtp.gmail.com",ip="142.250.27.109",rbl="zen.spamhaus.org"} 0

@till
Copy link
Contributor

till commented Jan 16, 2024

Thank you! 🙏 I see I screwed this up with the refactoring. Do you think we can add an additional test?

@s-diez
Copy link
Contributor Author

s-diez commented Jan 16, 2024

Thank you! 🙏 I see I screwed this up with the refactoring. Do you think we can add an additional test?

Looking into it. Looks like it should be testable.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Jan 16, 2024
@till
Copy link
Contributor

till commented Jan 18, 2024

@s-diez @torvitas Thank you very much for this! :)

@till till merged commit 909a7de into Luzilla:main Jan 18, 2024
6 checks passed
@s-diez
Copy link
Contributor Author

s-diez commented Jan 18, 2024

@till Thanks for the project and the fast responses

@till till mentioned this pull request Jan 19, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants