|
1 | 1 | --- |
2 | 2 | title: 'Upgrading to DefectDojo Version 2.54.x' |
3 | 3 | toc_hide: true |
4 | | -weight: -20250804 |
5 | | -description: Dropped support for DD_PARSER_EXCLUDE |
| 4 | +weight: -20251201 |
| 5 | +description: Removal of django-auditlog and exclusive use of django-pghistory for audit logging & Dropped support for DD_PARSER_EXCLUDE |
6 | 6 | --- |
7 | 7 |
|
| 8 | +## Breaking Change: Removal of django-auditlog |
| 9 | + |
| 10 | +Starting with DefectDojo 2.53, `django-auditlog` support has been removed in favour of `django-pghistory`. |
| 11 | +This is designed to be a backwards compatible change, unless: |
| 12 | +- You're querying the database directly for auditlog events, or, |
| 13 | +- You've set the `DD_AUDITLOG_TYPE` environment variable (or `AUDITLOG_TYPE` settings field) |
| 14 | + |
| 15 | +### Required Actions |
| 16 | + |
| 17 | +If you're using `DD_AUDITLOG_TYPE`, remove it from your configuration/environment. |
| 18 | + |
| 19 | +### Existing Records Preserved |
| 20 | + |
| 21 | +Historical audit log entries stored in the `auditlog_logentry` table will continue to be displayed in the action history view for backward compatibility. No data migration is required. |
| 22 | + |
| 23 | +### Benefits of django-pghistory |
| 24 | + |
| 25 | +The switch to `django-pghistory` provides several advantages: |
| 26 | + |
| 27 | +- **Better performance**: Database-level triggers reduce overhead compared to Django signal-based auditing |
| 28 | +- **More features**: Enhanced context tracking and better support for complex queries |
| 29 | +- **Better data integrity**: PostgreSQL-native implementation ensures consistency |
| 30 | + |
| 31 | +### Migration Notes |
| 32 | + |
| 33 | +- A one-time data migration will take place to populate the `django-pghistory` tables with the initial snapshot of the tracked models. |
| 34 | +- The migration is designed to be fail-safe: if it fails for some reason, it will continue where it left off. |
| 35 | +- The migration can also be performed up front via |
| 36 | + - `docker compose exec uwsgi bash -c "python manage.py pghistory_backfill_fast"`, or |
| 37 | + - `docker compose exec uwsgi bash -c "python manage.py pghistory_backfill_simple"`, or |
| 38 | + - `docker compose exec uwsgi bash -c "python manage.py pghistory_backfill"` |
| 39 | + |
| 40 | +The backfill migration is not mandatory to succeed. If it fails for some reason, the only side effect will be that the first auditlog diff will contain all fields of an object instead just the changed fields. |
| 41 | + |
| 42 | +## Dropped support for DD_PARSER_EXCLUDE |
| 43 | + |
8 | 44 | To simplify the management of the DefectDojo application, parser exclusions are no longer controlled via the environment variable DD_PARSER_EXCLUDE or application settings. This variable is now unsupported. |
9 | 45 | From now on, you should use the active flag in the Test_Type model to enable or disable parsers. Only parsers associated with active Test_Type entries will be available for use. |
10 | 46 |
|
11 | | -There are other instructions for upgrading to 2.54.x. Check the Release Notes for the contents of the release. |
| 47 | +Check the [Release Notes](https://github.com/DefectDojo/django-DefectDojo/releases/tag/2.54.0) for the contents of the release. |
0 commit comments