Skip to content

NETCUP: fixup provider to make it pass the latest integration test suite - #4698

Open
kordianbruck wants to merge 3 commits into
DNSControl:mainfrom
kordianbruck:fix-netcup
Open

NETCUP: fixup provider to make it pass the latest integration test suite#4698
kordianbruck wants to merge 3 commits into
DNSControl:mainfrom
kordianbruck:fix-netcup

Conversation

@kordianbruck

Copy link
Copy Markdown
Contributor

This pull request introduces several improvements and fixes to the Netcup DNS provider integration, focusing on API efficiency, compliance with provider limitations, and enhanced record validation. The main changes include batching record operations into a single API call, enforcing new auditing rules for TXT and CAA records, and adding rate limiting to respect Netcup's API restrictions.

Netcup Provider API Improvements:

  • Refactored record creation, deletion, and modification to batch all changes into a single API call (updateDnsRecords), improving efficiency and reducing the number of API requests. The individual createRecord, deleteRecord, and modifyRecord methods were removed, and all corrections are now collected and sent together.
  • Introduced a delay of 334ms after each API request to comply with Netcup's rate limit of 180 requests per minute.

Provider Limitations and Integration Tests:

  • Updated integration tests to mark Netcup as not supporting custom TTLs and per-record TTLs for SRV records, ensuring tests accurately reflect provider capabilities. [1] [2]

Auditing and Validation Enhancements:

  • Added new auditing rules for Netcup: TXT records are now checked for backslashes, single quotes, and double quotes, and CAA records are checked for semicolons in their target field, to match Netcup's API restrictions. [1] [2]

Codebase Cleanups:

  • Removed now-unused imports and updated import lists for clarity and correctness. [1] [2]

Other Minor Fixes:

  • Minor code cleanups and formatting improvements for better readability and maintainability.

@kordianbruck

Copy link
Copy Markdown
Contributor Author

I'm assuming we can then also fold this into the release_candidate_v5 branch and see what else needs adaption?

@kordianbruck

Copy link
Copy Markdown
Contributor Author

In anticipation of me having done the wrong thing, I've updated the same change for the v5 version that I could also instead send as a PR to the release branch and abandon this PR. Let me know what you'd prefer: https://github.com/kordianbruck/dnscontrol/tree/fix-netcup-v5

@TomOnTime

Copy link
Copy Markdown
Collaborator

Hi there!

Yup, you guessed right. I'm focused on changes for v5 only right now. "main" is getting very few updates. Sorry for any confusion!

Would you please make a PR based on https://github.com/kordianbruck/dnscontrol/tree/fix-netcup-v5 ? (and close this)

Thanks!
Tom

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.

2 participants