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

AZURE: populate zone cache after creating zone #3329

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

das7pad
Copy link
Contributor

@das7pad das7pad commented Jan 8, 2025

Hi @vatsalyagoel!
While reviewing all the ZoneCreator implementations, I noticed that the AZURE provider has an incomplete caching implementation for zones. The provider is populating the cache once on startup. Any zones that are created will not readable in the same life-cycle of dnscontrol. This PR is populating the zone cache with any newly created zones for later use. Would you mind giving this a try and let me know how it goes? Thanks!

Part of #3007

@tlimoncelli
Copy link
Contributor

This passes integration tests... but the integration tests don't use any concurrency.

...
        --- PASS: TestDNSProviders/dnscontrol-azure.com/82:PORKBUN_URLFWD_tests_***SKIPPED(disabled_by_only)***:Empty (0.14s)
        --- PASS: TestDNSProviders/dnscontrol-azure.com/83:GCORE_metadata_tests_***SKIPPED(disabled_by_only)***:Empty (0.32s)
        --- PASS: TestDNSProviders/dnscontrol-azure.com/Clean_Slate:Empty#41 (0.14s)
        --- PASS: TestDNSProviders/dnscontrol-azure.com/84:final:final (0.99s)
=== RUN   TestDualProviders
Testing Profile="AZURE_DNS" TYPE="AZURE_DNS"
    integration_test.go:414: Clearing everything
    integration_test.go:408: #1:
        - DELETE final.dnscontrol-azure.com TXT "TestDNSProviders was successful!" ttl=300
    integration_test.go:421: Adding test nameservers
    integration_test.go:408: #1:
        + CREATE dnscontrol-azure.com NS ns1.example.com. ttl=300
        + CREATE dnscontrol-azure.com NS ns2.example.com. ttl=300
    integration_test.go:424: Running again to ensure stability
    integration_test.go:440: Removing test nameservers
    integration_test.go:408: #1:
        - DELETE dnscontrol-azure.com NS ns1.example.com. ttl=300
        - DELETE dnscontrol-azure.com NS ns2.example.com. ttl=300
--- PASS: TestDualProviders (3.27s)
=== RUN   TestNameserverDots
Testing Profile="AZURE_DNS" TYPE="AZURE_DNS"
=== RUN   TestNameserverDots/No_trailing_dot_in_nameserver
--- PASS: TestNameserverDots (0.42s)
    --- PASS: TestNameserverDots/No_trailing_dot_in_nameserver (0.00s)
PASS
ok  	github.com/StackExchange/dnscontrol/v4/integrationTest	430.738s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants