Replies: 2 comments 3 replies
-
|
Ah, you've definitely identified a real problem: APIs being improved and we don't notice. Ideally we'd have a GHA that runs periodically that just tells us "Hey, the following providers can remove the How to implement that.... let me give this more thought. |
Beta Was this translation helpful? Give feedback.
-
|
Suggestion: (and this might be a big change from the direction you're currently going. It's not a requirement, just something to consider) I notice that the logic in runTests() is getting a bit hairy with all the various modes. So many if/thens! Consider moving all the tests related to validating rejectif statements to a separate test function (possibly named runRejectAuditTests()). That way runTests() can run faster (fewer tests) and runRejectAuditTests() can have very different reporting logic, and hopefully more simplifed the logic. Go testing has a "fast tests only" mode (See go test -short) thus saving us from having to create logic around when to run the audit tests. That should simplify things further. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I asked about creating an 'expect failure' test mode in the last developer meeting. This is the issue I had in mind.
Providers have an 'AuditRecords' ruleset to filter out zone corrections that the service does not support.
A common example is
a.Add("TXT", rejectif.TxtIsEmpty), which will prevent pushing a TXT RR with an empty value.When service providers change their support for such records, DNSControl will continue blocking them until someone notices and raises a bug report. The rules defined in many of the providers include a comment along the lines of
// last verified 20XX-XX-XX, suggesting some automation could save the effort of spot checking these to keep them up to date.Current example: INWX provider blocks TXT RRs with a trailing space (noted 2021-03-01). The service provider currently allows such records, meaning sometime in the past 4 years the audit records filter became outdated.
Proposal: detect this situation in CI
Proposal A: add a new TestCase receiver method that can be used to invert the test failure mode in regular integration test runs.
onlyfilter)that would require maintenance
proposal B: add a new flag for an audit records test mode to the integration test suite
expected-good tests, run only the normally skipped tests.
proposal C: make a new 'ignore' mode that runs all tests, ignoring the filtering done by AuditRecords
Other options? surely some other approach I didn't think of.
Right now I would lean toward proposal B as the exclusive implementation. I haven't come up with a use-case for a validation test that would only work with the option A approach. I can see downsides to both. Running the validation tests with every integration test run is excessive since the prohibition of the relevant RRs is unlikely to change often, maybe not ever. Option B and C are a bit more invasive to the overall integration test suite. The implementation I arrived at uses a new workflow - I think these rule validation tests should probably not be run frequently, so making a manual or schedule-able CI job fits, but does this issue warrant a special CI workflow?
I roughed out an implementation that is close to supporting all three modes but I think one should be chosen to keep the complexity down. I decided to stop and see what folks think of the idea in general.
Demo test output of proposal B, showing that the trailing spaces filter is not needed:
https://github.com/eliheady/dnscontrol/actions/runs/14646338089/job/41102042315#step:6:2305
edit, in case that job output is not available to everyone:
Beta Was this translation helpful? Give feedback.
All reactions