-
Notifications
You must be signed in to change notification settings - Fork 409
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
feat(providers): add netlify #1820
Conversation
fbb3be5
to
7b3402b
Compare
Looks good so far! Just FYI: It is normal for tests to fail as "unauthorized". Github won't provide API keys to PRs that come from outside. Let me know when its ready for for review. |
Hello, this is ready for review. Thanks! |
Found a couple issues while testing this out
diff --git providers/netlify/netlifyProvider.go providers/netlify/netlifyProvider.go
index 2752274fd229..4bdfb6580965 100644
--- providers/netlify/netlifyProvider.go
+++ providers/netlify/netlifyProvider.go
@@ -116,7 +116,7 @@ func (n *netlifyProvider) GetZoneRecords(domain string) (models.Records, error)
}
err = rec.SetTargetSRV(uint16(r.Priority), r.Weight, r.Port, r.Value)
case "TXT":
- err = rec.SetTargetTXTfromRFC1035Quoted(r.Value)
+ err = rec.SetTargetTXT(r.Value)
case "CAA":
err = rec.SetTargetCAA(uint8(r.Flag), r.Tag, r.Value)
default: |
Thanks for the report @msfjarvis, working on these issues. |
Hello, I've been working with @msfjarvis to fix the issues he reported. The TXT records issue has been fixed, but NETLIFY records seem to be rather painful. Through a bit of experimentation, it's clear that the Netlify API does not allow for manual creation of these records. One option is just to transparently ignore them, but I'm open to other suggestions. Your advice would be very welcome @tlimoncelli 😄 |
I concur. Let's break this into 2 merges. The first will ignore NETLIFY records. Then work out how to handle them in a second merge. |
It seems like Perhaps it's worth exploring the |
Likely unsuitable to be merged into the PR, but with this diff applied I've been able to use D('msfjarvis.dev', NewRegistrar('none'), DnsProvider(NewDnsProvider('netlify')),
IGNORE_NAME('*', 'NETLIFY'),
IGNORE_NAME('*', 'NETLIFYv6'),
); |
Been thinking about this some more, as I'm think the solution might be just transparently ignore as suggested. |
@abovedave Oh! That makes a lot of sense! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as the code is concerned, this all looks great! No suggestions.
I won't merge it until I hear from you about ignoring the NETLIFY records, etc.
Hey, just got back to work on this. No, we don't need NETLIFY stuff in the helpers; I'll remove those and modify the provider to ignore NETLIFY records in a moment. |
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
Co-authored-by: msfjarvis <me@msfjarvis.dev> Signed-off-by: Amogh Lele <amolele@gmail.com>
…helpers Signed-off-by: Amogh Lele <amolele@gmail.com>
also rename some functions to singular Signed-off-by: Amogh Lele <amolele@gmail.com>
Signed-off-by: Amogh Lele <amolele@gmail.com>
…m to js helpers" This reverts commit 9539867.
Signed-off-by: Amogh Lele <amolele@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified that the provider correctly skips the NETLIFY and NETLIFYv6 rtypes for my site
Thank you for the contribution! A lot of people have asked for this! |
Cheers! |
Thanks for adding this! Can you add a clarification to the docs about why someone would want to provide (or not provide) an account slug? |
@SphericalKat Not sure if you saw my comment above but it was a minor point of confusion as I was setting up my Netlify configuration ^ |
Closes #714