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

fix: correct diffs when comparing objects with empty tags #985

Merged
merged 2 commits into from
Jul 27, 2023

Commits on Jul 26, 2023

  1. fix: correct diffs when comparing objects with empty tags

    Right now, when some declarative configuration having empty tags
    on any of its entities is deployed, subsequent `diff` / `sync`
    will show misleading results:
    
    ```
    $ cat kong.yaml
    _format_version: "3.0"
    services:
      - name: foo
        protocol: http
        host: foo
        port: 8000
        tags: []
    
    $ deck sync
    creating service foo
    Summary:
      Created: 1
      Updated: 0
      Deleted: 0
    
    $ deck sync
    updating service foo  {
       "connect_timeout": 60000,
       "enabled": true,
       "host": "foo",
       "id": "afadd2ed-2bcd-49fc-9000-adb58cd11b50",
       "name": "foo",
       "port": 8000,
       "protocol": "http",
       "read_timeout": 60000,
       "retries": 5,
       "write_timeout": 60000
     }
    
    Summary:
      Created: 0
      Updated: 1
      Deleted: 0
    ```
    
    The second `deck sync` run is showing an update without an actual diff.
    This is due to the way empty tags are treated internally in decK.
    
    This commit fixes this defect.
    GGabriele committed Jul 26, 2023
    Configuration menu
    Copy the full SHA
    31e11bd View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. add changelog entry

    GGabriele committed Jul 27, 2023
    Configuration menu
    Copy the full SHA
    7ac1b1a View commit details
    Browse the repository at this point in the history