Skip to content
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

Existing record attributes get set to empty upon a record change. #559

Closed
VNRARA opened this issue Aug 19, 2023 · 14 comments · Fixed by #580
Closed

Existing record attributes get set to empty upon a record change. #559

VNRARA opened this issue Aug 19, 2023 · 14 comments · Fixed by #580
Labels
blocked This issue or pull request is blocked by something outside the authors' control bug Something isn't working as expected
Milestone

Comments

@VNRARA
Copy link

VNRARA commented Aug 19, 2023

Existing record attributes are removed when records are updated. I'd like it not to.

@VNRARA VNRARA changed the title Existing record attributes get set to empty upon API change. Existing record attributes get set to empty upon a record change. Aug 19, 2023
@favonia favonia added the bug Something isn't working as expected label Aug 19, 2023
@favonia
Copy link
Owner

favonia commented Aug 19, 2023

@VNRARA Thanks for the reporting and sorry for the trouble. It was designed not to do this. I need more information to track down the bug (if any). Which attributes were removed? What are the log and configuration (but remember to remove sensitive content such as your API tokens)?

@VNRARA
Copy link
Author

VNRARA commented Aug 19, 2023

It's about this ones: https://developers.cloudflare.com/dns/manage-dns-records/reference/record-attributes/

image

logDDNSCF.txt

@favonia
Copy link
Owner

favonia commented Aug 19, 2023

@VNRARA Thank you. A proper fix needs the upstream to change their code and I have created an issue at cloudflare/cloudflare-go#1371. I can also implement a hack that retrieves your existing comment before updating it, and maybe I will release a new version with the hack soon. Or, you can use version 1.8.2 or below before the upstream library introduced the current behavior.

Some background: I have noticed this design issue of the upstream library some time ago but didn't double check their final solution after getting busy at my primary job. It seems the design bug of the upstream library started to cause clearing (what you observed) at the version 0.60.0, and that means the updater of versions after 1.8.3 were all affected. Sorry about the trouble.

@VNRARA
Copy link
Author

VNRARA commented Aug 19, 2023

I'll keep using the latest version and fix the comments some later time.

@favonia favonia added the blocked This issue or pull request is blocked by something outside the authors' control label Aug 28, 2023
@favonia
Copy link
Owner

favonia commented Aug 29, 2023

@VNRARA I tried to implement the hack and it messed up the current test cases a bit. I prefer to wait for the upstream to fix it, but I will implement the hack (with appropriate testing) if the upstream decides not to do anything.

@favonia favonia added this to the near future milestone Sep 10, 2023
@favonia
Copy link
Owner

favonia commented Sep 10, 2023

@VNRARA Progress: I made a PR to the upstream repo: cloudflare/cloudflare-go#1393. Ideally the DNS updater does not have to change if this PR is merged.

@favonia
Copy link
Owner

favonia commented Sep 12, 2023

@VNRARA Progress: my PR was merged, and I'll release a new version once the dependency is updated.

@favonia
Copy link
Owner

favonia commented Sep 13, 2023

@VNRARA I believe the bug was fixed. Before I release the next official version, could you confirm that the edge tag will preserve existing tags and comment when updating the IP? Thank you.

@favonia favonia modified the milestones: near future, 1.10.1 Sep 13, 2023
@VNRARA
Copy link
Author

VNRARA commented Sep 13, 2023

Hey thanks for keeping me up to date. I'm unsure what how you'd like me to test the edge tag.

@favonia
Copy link
Owner

favonia commented Sep 13, 2023

@VNRARA The current installation guide told you to use the image favonia/cloudflare-ddns:latest. You can try the next version to be released by temporarily using favonia/cloudflare-ddns:edge instead. Try intentionally change the IP and the tags and/or comments and see if the IP can be updated while keeping others intact. Remember to change edge back to latest after the experiment because the edge version is for me to try out new stuff.

@VNRARA
Copy link
Author

VNRARA commented Sep 14, 2023

I'll try to report back withing 8 hours.

@VNRARA
Copy link
Author

VNRARA commented Sep 17, 2023

Srry for being late: It seems to work fine.

@favonia
Copy link
Owner

favonia commented Sep 17, 2023

@VNRARA Thanks for the confirmation.

@favonia
Copy link
Owner

favonia commented Sep 17, 2023

@VNRARA The new version with the fix has been published. It is recommended to switch back to latest because edge is for me to try out new things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked This issue or pull request is blocked by something outside the authors' control bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants