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

Sort or Dedupe for better diff #333

Open
nickv2002 opened this issue Mar 6, 2024 · 0 comments
Open

Sort or Dedupe for better diff #333

nickv2002 opened this issue Mar 6, 2024 · 0 comments

Comments

@nickv2002
Copy link

nickv2002 commented Mar 6, 2024

Issue type

  • Feature idea

cli53 version (cli53 --version)

cli53: stable 0.8.22 (bottled)

OS / Platform

Mac 14.3.1

Steps to reproduce

I added one text record (and new line) to a zone file that I exported out of cli53 then I used the command below to preview what it would look like when re-adding.

Example output:

cli53 import --wait --dry-run --file ./example.com.zone --replace example.com
Dry-run, changes that would be made:
+ example.com.        300     IN      TXT     "MS=ms1234"
+ example.com.        300     IN      TXT     "google-site-verification=asdf"
- example.com.        300     IN      TXT     "MS=ms1234"

In the abridged and simplified output, you can see that the same MS=ms1234 TXT record is shown as both removed and added, but there are other non-changing entries that don't show up. This is confusing output because the order doesn't matter (AFAIK) and the output changes each time I run a dry-run.

Expected behaviour

Just show the changes in a consistent order

cli53 import --wait --dry-run --file ./example.com.zone --replace example.com
Dry-run, changes that would be made:
+ example.com.        300     IN      TXT     "google-site-verification=asdf"

Actual behaviour

See example above.

Have you checked if the documentation has the information you require?

I looked for sort and dedupe options but didn't find any.

Could you contribute a fix or help testing with this issue?

I could test easily.

Suggestion

Seems like a simple sort should work here. Probably the same for cli53 export.

@nickv2002 nickv2002 changed the title Sort and Dedupe for better diff Sort or Dedupe for better diff Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant