-
Notifications
You must be signed in to change notification settings - Fork 597
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
Fix CreateOrUpdate needs the record name #1341
Fix CreateOrUpdate needs the record name #1341
Conversation
changelog detected ✅ |
998d604
to
508092b
Compare
For now, it was failing because we were not passing the name to the record to be created if it was not present.
508092b
to
b0ecaf3
Compare
rr.Proxied = &proxy | ||
rr.Priority = &priority | ||
rr := cloudflare.CreateDNSRecordParams{ | ||
Name: name, |
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.
Changed the initialisation to make it match the dnsCreate
method. The key change to fix the bug is line 118, now because the name
was not being sent to create
which would create a DNS Validation Error (1004)
Proxied: &proxy, | ||
Priority: &priority, | ||
} | ||
|
||
// TODO: Print the response. |
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.
I think this TODO
(see writeTable function call below) can be removed - but is unrelated to this PR.
.changelog/1341.txt
Outdated
@@ -0,0 +1,3 @@ | |||
```release-note:bug | |||
dns: allow for create or update to actually create the record |
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.
dns: allow for create or update to actually create the record | |
flarectl: allow for create or update to actually create the record |
Codecov Report
@@ Coverage Diff @@
## master #1341 +/- ##
==========================================
+ Coverage 48.33% 48.42% +0.08%
==========================================
Files 133 134 +1
Lines 13023 13104 +81
==========================================
+ Hits 6295 6345 +50
- Misses 5201 5220 +19
- Partials 1527 1539 +12
|
This functionality has been released in v0.74.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
For now, it was failing because we were not passing the name to the record to be created if it was not present.
Description
Make the CLI act as expected in
create-or-update
when no records are foundHas your change been tested?
Yes - ran it against a host I have
Types of changes
Checklist:
and relies on stable APIs.