Skip to content

GCLOUD: correction message strings for multiple changes affecting same label + type are partially dropped #2758

@asn-iac

Description

@asn-iac

Describe the bug
When multiple changes affect the same label + type in a GCLOUD zone, push/preview only displays one of the messages

To Reproduce
Steps to reproduce the behavior:

  1. An existing dnsconfig and empty zones created in the GCLOUD account:
var DNS_GOOGLE = NewDnsProvider('gcloud');
D("dnscontrol-integration-test.com", REG_NONE,DnsProvider(DNS_GOOGLE),
	NAMESERVER_TTL('21600')
);
  1. Modify the dnsconfig with changes that affect the same label + type:
var DNS_GOOGLE = NewDnsProvider('gcloud');
D("dnscontrol-integration-test.com", REG_NONE,DnsProvider(DNS_GOOGLE),
	NAMESERVER_TTL('21600'),
	MX('@', 10, 'mail.foo.bar.'),
	MX('@', 10, 'mail2.foo.bar.'),
	TXT('@', 'foo'),
	TXT('@', 'bar'),
	A('foo', '127.0.0.1'),
	A('foo', '127.0.0.2')
);
  1. Run 'dnscontrol preview'
$ dnscontrol preview
******************** Domain: dnscontrol-integration-test.com
1 correction (gcloud)
#1: + CREATE MX dnscontrol-integration-test.com 10 mail2.foo.bar. ttl=300
+ CREATE TXT dnscontrol-integration-test.com "foo" ttl=300
+ CREATE A foo.dnscontrol-integration-test.com 127.0.0.2 ttl=300
Done. 1 corrections.

Expected behavior
Preview/Push should display all changes associated with a label

$ dnscontrol preview
******************** Domain: dnscontrol-integration-test.com
1 correction (gcloud)
#1: + CREATE MX dnscontrol-integration-test.com 10 mail.foo.bar. ttl=300
+ CREATE MX dnscontrol-integration-test.com 10 mail2.foo.bar. ttl=300
+ CREATE TXT dnscontrol-integration-test.com "bar" ttl=300
+ CREATE TXT dnscontrol-integration-test.com "foo" ttl=300
+ CREATE A foo.dnscontrol-integration-test.com 127.0.0.1 ttl=300
+ CREATE A foo.dnscontrol-integration-test.com 127.0.0.2 ttl=300
Done. 1 corrections.

DNS Provider

  • GCLOUD

Additional context
The actual API changes are still read and executed correctly so the integration tests are passing. Will submit PR with fix for the messages.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions