Skip to content

Improve --dry-run diff #333

Description

@nickv2002

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions