Kong / Kong/deck

Support changing IDs for entities other than Services, Routes, and Consumers

Open
#922 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
503
Forks
137
Avg merge
3d 5h
Merged PRs (30d)
20

Description

## Description

https://github.com/Kong/deck/pull/918 has implemented support for changing IDs while keeping entities' names between deck syncs for Service, Route, and Consumer entities.

The goal of this issue is to implement similar behavior for every entity that still can be affected by the lack of this capability due to unique constraints enforced on some property of the entity other than its ID.

### Affected entities:

- Upstream (a unique constraint on `name`)
- ... TBD

## Proposed solution

Similarly to https://github.com/Kong/deck/pull/918, implement `DuplicatesDeleter` interface in every entity's differ and generate Delete events once a duplicate is detected. Make sure that any implicit cascade deletes are handled in the entity's `*PostAction`.

## Acceptance criteria

- [ ] It's possible to run deck syncs twice, changing only the ID properties of all entities between each run

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading PR 918 and the existing DuplicatesDeleter implementations for Service, Route, and Consumer entities. Inventory the remaining entity differs and their unique constraints, beginning with Upstream, and review each entity's *PostAction for implicit cascade deletes. Done means deck sync can run twice with only entity IDs changed, without unique-constraint conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.