Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IGNORE doesn't work with providers that don't set RecordConfig.Name #312

Closed
masterzen opened this issue Feb 1, 2018 · 6 comments
Closed

Comments

@masterzen
Copy link
Contributor

I just discovered that some (most?) providers never sets RecordConfig.Name for existing record, unlike what I did in the OVH provider (coincidentally I'm only testing with this provider).

Unfortunately, the #300 PR adding the IGNORE directive just test on the Name, not the NameFQDN. I'm going to push a bug fix ASAP for this issue.

But a quick question, shouldn't all provider fill the Name field along with the NameFQDN field?
The comment in https://github.com/StackExchange/dnscontrol/blob/master/models/dns.go#L61 as I read it seems to imply it should always exist.

@masterzen
Copy link
Contributor Author

This is fixed with PR #313 .

@tlimoncelli
Copy link
Contributor

Part of the refactoring done last month was to eliminate the .Name field and replace it with getters/setters. Has this fixed this issue? (or made it worse?)

@masterzen
Copy link
Contributor Author

@tlimoncelli

The refactor changed nothing to this issue. I fixed this issue so that the code uses NameFQDN instead of Name (see commit b7c6efa).

So, you can either close this issue, or I can rewrite the IGNORE feature to use the GetLabel getter (this would remove a TrimDomainName call per label if that matters).

@TomOnTime
Copy link
Collaborator

Please rewrite it to use GetLabel(). Eventually we'd like to unexport .Name and .Target entirely.

@tlimoncelli
Copy link
Contributor

anything left to do?

@masterzen
Copy link
Contributor Author

@tlimoncelli no, you can close this issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants