Skip to content

sync with --select-tag can replace existing certificate without indicating an update / delete if ID is mixed up by mistake #1543

@harshadixit12

Description

@harshadixit12

Issue
We have a customer report where two separate teams were running deck gateway syncs (from separate files) with --select-tag and a certificate object. Somehow, they crossed wires and the ID became the same for both files (but different tags)
The console output for both indicates it is "creating" the object, however, it was actually overwriting/updating the original object.

How to recreate?
Have two files for sync
On deck file A - Select tag was "TestA" and the ID of certificate was "XYZ"
On deck file B - Select tag was "TestB" and the ID of certificate was "XYZ"
Now, run deck gateway sync --select-tag {tag} {file} for each file one after the other

This would be the response for both
creating certificate XYZ
Summary:
Created: 1
Updated: 0
Deleted: 0

Now, run deck gateway dump and check the output - the first certificate is replaced.

Indication that the certificate is being replaced is missing.

Expected behaviour
When a resource is being updated / replaced, we should indicate on the console.
Ideally, selected tags should match even when ID is provided

Note: The same behaviour occurs with other entities as well.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions