Skip to content

fix: use bool type for DD_DUPLICATE_CLUSTER_CASCADE_DELETE env var#14565

Open
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:fix-cascade-delete-env-type
Open

fix: use bool type for DD_DUPLICATE_CLUSTER_CASCADE_DELETE env var#14565
valentijnscholten wants to merge 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:fix-cascade-delete-env-type

Conversation

@valentijnscholten
Copy link
Member

@valentijnscholten valentijnscholten commented Mar 21, 2026

The DD_DUPLICATE_CLUSTER_CASCADE_DELETE env var was declared as str instead of bool in settings.dist.py, meaning it was never properly parsed as a boolean.

This means it was always parsed as True (ot at least Truthy) so the behaviour was always to delete the full duplicate cluster when an original finding was deleted. This is not only very slow as it triggers all signals, it might also not be what users expect.

This PR fixes the bug. But this also means the default behaviour changes because the flag is now correctly parsed as False. This might surprise users. Since we have never had any complaints of bug reports, we may be better off changing the default to True? From a performance point of view False is much better :-)

Let me know your thoughts @Maffooch @mtesauro

@github-actions github-actions bot added the settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR label Mar 21, 2026
@valentijnscholten valentijnscholten added this to the 2.57.0 milestone Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant