Skip to content

Conversation

@xnaveenx
Copy link

Fixes #4336
Proposed changes
This PR fixes a bug where updating an experiment would fail with a "Duplicate Name" error if a deleted experiment existed with the same name.

Changes:

Modified the database query in the UpdateChaosExperiment handler.

Added a filter to exclude experiments where is_removed: true (or deleted_at is not null) during the name uniqueness check.

Types of changes
[ ] New feature (non-breaking change which adds functionality)

[x] Bugfix (non-breaking change which fixes an issue)

[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

[ ] Documentation Update (if none of the other choices applies)

Checklist
[x] I have read the CONTRIBUTING doc

[x] I have signed the commit for DCO to be passed.

[x] Lint and unit tests pass locally with my changes

[x] I have added tests that prove my fix is effective or that my feature works (if appropriate)

[ ] I have added necessary documentation (if appropriate)

Dependency
None

Special notes for reviewer:
Verification (The "Ghost Test"): I verified this locally on a K8s cluster:

Created an experiment named Ghost-Test.

Deleted Ghost-Test.

Created a new experiment named Ghost-Test (this worked previously).

The Fix: Successfully updated the new Ghost-Test (added tags/description). Before this fix, this step failed with a duplicate error.

Signed-off-by: xnaveen <naveen010210@gmail.com>
@xnaveenx xnaveenx force-pushed the fix-duplicate-name-update branch from 027b35d to 90bc4f4 Compare December 20, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to add tags to an existing experiment

1 participant