Skip to content

Disable automatic DNS tests on *_nses.yml unless tests run with SD_TEST_NS_DNS=1#15226

Open
talflon wants to merge 1 commit into
Charcoal-SE:masterfrom
talflon:dg-test-yaml-nses-validate-quick
Open

Disable automatic DNS tests on *_nses.yml unless tests run with SD_TEST_NS_DNS=1#15226
talflon wants to merge 1 commit into
Charcoal-SE:masterfrom
talflon:dg-test-yaml-nses-validate-quick

Conversation

@talflon

@talflon talflon commented May 4, 2026

Copy link
Copy Markdown

When a domain listed (and not disabled) in blacklisted_nses.yml or watched_nses.yml expires or is misconfigured, we get a lot of spam of failing tests in CHQ, because tests/test_blacklists.py::test_yaml_nses_validate does DNS lookups for these.

But with the current code, these DNS failures don't cause improper operation of the spam checks: nothing would crash, and there'd only be extra FPs if a NS domain was bought by a new, innocent party. We can always disable a domain if and when FPs appear.

This PR disables the DNS lookups when tests are run under normal settings, continues to test for malformed entries in the YML files, and allows doing the full test by setting the environment variable SD_TEST_NS_DNS=1. This means:

  • no more CI errors filling up CHQ for this particular situation
  • no more needing to write and review PRs to clean up CHQ for this
  • if someone really wants to do this test, they'll need to remember to set the variable

Changes made to accomplish this:

  • test_yaml_nses_validate() renamed to test_yaml_nses_validate_dns(), and isn't run unless env var SD_TEST_NS_DNS=1
  • new test_yaml_nses_validate_quick() does only non-DNS checks of the entries

- With the current code, failures on these tests don't cause improper operation
  of the spam checks: nothing would crash, and there'd only be extra FPs
  if a NS domain was bought by a new, innocent party. We can always disable the domain
  when the FPs appear.
- test_yaml_nses_validate() renamed to test_yaml_nses_validate_dns(),
  and isn't run unless env var SD_TEST_NS_DNS=1
- new test_yaml_nses_validate_quick() does only non-DNS checks of the entries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant