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

Make dump output more easily diffable #116

Open
janv8000 opened this issue Feb 6, 2018 · 2 comments
Open

Make dump output more easily diffable #116

janv8000 opened this issue Feb 6, 2018 · 2 comments

Comments

@janv8000
Copy link

janv8000 commented Feb 6, 2018

The YAML output produced by a dump does not always retain the same order (between runs or between different instances).

Output 1

host: <redacted>
https: true
headers:
  - 'X-APIKEY:...'
apis:
  - name: api1
    plugins:
      - name: second_plugin
        attributes:
          enabled: true
      - name: acl
        attributes:
          enabled: true
  - name: api2
    plugins:
      - name: acl
        attributes:
          enabled: true

Output 2

host: <redacted>
https: true
headers:
  - 'X-APIKEY:...'
apis:
  - name: api2
    plugins:
      - name: acl
        attributes:
          enabled: true
  - name: api1
    plugins:
      - name: acl
        attributes:
          enabled: true    
      - name: second_plugin
        attributes:
          enabled: true

The two outputs are functionally equivalent but comparing them is a bit more work.

Ideally api's would be ordered by name/id, then plugins by name/id, then ...

@CyExy
Copy link
Contributor

CyExy commented Feb 6, 2018

This would fit in the try-run category of features, or in other words diffing the server state and your config file and getting an output that would show what would change if you would apply your config.

To understand more your reasoning and use-case; why is it useful to you to compare the outputs?

@janv8000
Copy link
Author

janv8000 commented Feb 7, 2018 via email

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

No branches or pull requests

2 participants