Skip to content

Plugin with same ID but different attached entities causes failure in postprocess after syncing to Kong gateway #272

@randmonkey

Description

@randmonkey

When we sync Kong configuration with a plugin having the same ID but different attached entities (combination of service, route, consumer, consumer group) with an existing plugin, the plugin is updated successfully but error happens on post process like:

Error: 1 errors occurred:
	while post processing event: inserting plugin response-transformer for service a872ace2-7d61-4c74-abec-092b308cbff4: entity already exists

The minimal reproduce scenario:
Run a Kong gateway with DB backed and then run deck sync with the following config file:

_format_version: "3.0"
services:
- name: service-1
  host: "example.com"
- name: service-2
  host: "konghq.com"
plugins:
- name: "response-transformer"
  config:
    add:
      headers:
      - 'X-Test-Header: added'
  id: 3a3e4bea-ef66-42c2-a528-68b6cfab0ef1
  service: service-1 # change to service-2 and run `deck sync` again will trigger the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions