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
MX priority not read/set correctly #1282
Comments
The list issue seems to be present even back in v0.58.1. The modify issue appears in v0.59.0, but is not present in v0.58.1. I can reproduce this using flarectl and checking in the web dashboard. |
thanks for the raising the issue here. |
Getting the priority seems to be a |
gotcha. flarectl is in maintenance only mode at the moment so we're not actively improving things too mcuh however, since this was a side effect of a recent change to support a change in Terraform and broke it pretty dramatically, i've pushed up a quick fix for it. from what i can see, this is only a flarectl issue and the issue isn't present anywhere else in the library. for future checking, i'd be wary of the flarectl output until it is revamped with the SDK to be automatically generated and not have issues like this one. |
This doesn't seem to address the problem with modifying the MX priority though. This isn't working for me from either flarectl or directly with the library (from dnscontrol). |
is your setting issue similar to #1015? that issue has been open for a while but lost the tration due to lack of op feedback and no repro. if so, can you drop your repro into that issue and we can continue the discussion there keeping these two issues separate? |
No, I'm just trying to modify an existing record. The MX priority does not change. This started in v0.59. |
do you have a repro i can look at for the library? i have some scripts internally and terraform configs that were definitely working recently so will need to dig into your specifics to see where it is falling down for you. i suspect something is silently failing validation in the API itself. |
I see it in the dnscontrol unit tests, but I don't have a standalone test case. I think I also saw it in flarectl - let me see if I can reproduce it with that. Is there a way to log all the HTTP requests made to the API? |
if you export |
Here's what I see using flarectl:
The web dashboard also shows that the priority doesn't change. |
and here's what I see in the log from flarectl with Debug enabled; the new priority isn't in the PATCH:
adding I see the same in the dnscontrol test that fails - the PATCH to change the MX priority does not include the new priority value. This works in v0.58, updating the library to v0.59 (and not changing anything else) breaks it. |
thanks for the flarectl example. as i mentioned, flarectl is in maintenace only mode so that is a less urgent issue for me right now however, if the library is having issues, that is something i'll need to jump onto. are you able to provide me a reproduction of just using the library where you are seeing issues? |
Just creating an MX record then immediately modifying the priority fails; the debug shows the PATCH does not include the priority.
|
The problem is, I think, that the metadata on the UpdateDNSRecordParams struct says not to send the priority value. If I change it as follows, then I can modify the priority.
|
looks like #1170 removed this after it was determined that it was a read only field for updates. with your example where you patch it locally to send the value, does the API accept and retain that value? |
Yes it does, and the documentation says it is valid also: https://developers.cloudflare.com/api/operations/dns-records-for-a-zone-patch-dns-record #1160 also added the "internal use only" comment which appears to be incorrect. |
happy if you want to send over a PR for what you have locally and we'll get it reviewed and merged. otherwise, I can take a look later this week. thanks again! |
This functionality has been released in v0.68.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Confirmation
cloudflare-go version
0.67 (same on HEAD at the time of writing)
Go environment
Expected output
MX record priority matches the web dashboard when running
flarectl dns list
.I'm also unable to modify the priority of existing records from go - the value does not change (set via library, checked on dashboard).
Actual output
MX priority is garbage, and changes each time flarectl is run. I think it's printing the pointer value.
Code demonstrating the issue
flarectl dns l --zone the.test.zone
Steps to reproduce
flarectl dns l --zone the.test.zone
References
No response
The text was updated successfully, but these errors were encountered: