Skip to content

websupport: Modernize record conversion - #4584

Open
TomOnTime wants to merge 13 commits into
release_candidate_v5from
mod_websupport
Open

websupport: Modernize record conversion#4584
TomOnTime wants to merge 13 commits into
release_candidate_v5from
mod_websupport

Conversation

@TomOnTime

Copy link
Copy Markdown
Collaborator

Dear @mtmn. I could use your help. I'm doing upgrades to the code base and I have no way to test your provider. Please run the integration test and let me know the result. How to run integration tests is here: https://docs.dnscontrol.org/developer-info/integration-tests

Summary

  • replace legacy RecordConfig construction and target setters with record factories
  • pass the domain configuration into Websupport record conversion
  • update conversion and audit tests to use factory-created records

Testing

  • ../../bin/is_modern.sh (Steps 1-7 clean)
  • go test ./providers/websupport
  • bin/generate-all.sh
  • go test ./...

@TomOnTime
TomOnTime requested a review from mtmn July 22, 2026 17:38
@TomOnTime
TomOnTime marked this pull request as ready for review July 23, 2026 04:00
@mtmn

mtmn commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

ACK, will take a look at it tomorrow.

@mtmn

mtmn commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Hi @TomOnTime, I have attached results from the integration tests runs.

There appears to have been a breaking change on how MX and SRV records read their priority. I will create an issue for it sometime next week and look into it.

20260726_231436.log

@TomOnTime

Copy link
Copy Markdown
Collaborator Author

Hi @TomOnTime, I have attached results from the integration tests runs.

There appears to have been a breaking change on how MX and SRV records read their priority. I will create an issue for it sometime next week and look into it.

20260726_231436.log

Thanks for the log! Here's some tips:

(1)

=== RUN   TestDNSProviders/miromiromir.com/06:MX:Create_MX_apex
    helpers_integration_test.go:272: Expected 0 corrections on second run, but found 1.
    helpers_integration_test.go:274: UNEXPECTED #0: <C2><B1> MODIFY miromiromir.com MX (0 foo.com. ttl=300) -> (5 foo.com. ttl=300)

The "Expected 0 corrections on second run, but found 1." message means that the API call was made to create a record, but the wrong records were created. It tries to do a 2nd "push" which should have zero changes (if the first push worked)... but 1 change was found.

In this case, either nativeToRecords or recordToNative is mishandling MX records. I've added printf's to help you debug this.

(2)

I've also added a TODO. Try the suggested code and let me know if it works. You'll probably want to try that after everything else works.

(3)

These failures indicate that Mikrotik just don't support these situations. You an disable the tests by updating auditrecords.go with rejectif.MxNull and rejectif.TxtHasTrailingSpace

    --- FAIL: TestDNSProviders/miromiromir.com/23:NullMX:create (1.57s)
    --- FAIL: TestDNSProviders/miromiromir.com/24:NullMXApex:create (1.52s)
    --- FAIL: TestDNSProviders/miromiromir.com/27:complex_TXT:TXT_trailing_ws (2.34s)

Hope that helps!

Tom

@TomOnTime

Copy link
Copy Markdown
Collaborator Author

Oh... I also updated how MX and SRV records are handled. That might fix the problem!

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.

3 participants