Bump Django 4.2 and DRF 3.15.2
https://redmine.teklia.com/issues/7215
Requires a new base image build: https://gitlab.teklia.com/arkindex/backend/-/pipelines/178545
- Django tried to recreate the
element_image_and_polygon
check constraint, but I have confirmed that the generated SQL for the constraint has not changed at all. I have instead updated theinitial
migration to ignore this. - Django's
ArrayField
implementation now uses'{}'::uuid[]
instead ofARRAY[]::uuid[]
for empty UUID arrays in ElementPath. It makes zero difference in how the queries run. The diffs in this MR show{{}}
, but that's because thesql_validation
files are used as Python format strings, so we have to escape the brackets. - DRF got smarter and adds more validators than before, but some of them were duplicated or unwarranted, so I had to update or remove them.
- Some of the validator updates were indeed useful, as their validation is now skipped when using
PartialUpdate
if their fields are not updated, so there actually were less queries in a few endpoints. - I found this bug in Django, which caused unexpected SQL queries when slicing a union with 0 items, which is what the DRF pagination does on
ListEntityElements
andListTranscriptions
withrecursive=True
when there are no results. - I pinned
sqlparse
for unit tests because CI was failing after an update. It used to not recognize the@>
operator on paths, so it would show it as@ >
, but it now understands it so I removed the space.
Edited by Erwan Rouchet
Merge request reports
Activity
changed milestone to %Arkindex 1.6.2
assigned to @erouchet
added 6 commits
- 1418609a - Update query counts due to Django bug
- 9e8a0e5e - Less queries from smarter DRF unique validators
- ccd311dc - Keep using our own validation for dataset sets
- 3ab0e24e - Custom error message on the DRF validator for user registration
- d3980b19 - Disable validator on user emails in VerifyEmail
- 53cb568d - Update error messages
Toggle commit listadded 1 commit
- cafbc043 - Fix failing SQL validation due to sqlparse update
added 1 commit
- b53b061d - Fix failing SQL validation due to sqlparse update
requested review from @babadie
added 18 commits
-
b53b061d...0a4b2e94 - 2 commits from branch
master
- 0a4b2e94...502dc66b - 6 earlier commits
- 59073f1b - Parentheses around indexed fields
- 705a8198 - Fight with Django's overkill casting
- b16c9c36 - Fix double unique constraint validation on element types
- b0fe36f4 - Update query counts due to Django bug
- c9868c5e - Less queries from smarter DRF unique validators
- e44db185 - Keep using our own validation for dataset sets
- 64c6fdf0 - Custom error message on the DRF validator for user registration
- 57eda795 - Disable validator on user emails in VerifyEmail
- 2361fcec - Update error messages
- 326a8c2f - Fix failing SQL validation due to sqlparse update
Toggle commit list-
b53b061d...0a4b2e94 - 2 commits from branch
mentioned in merge request !1581 (closed)
Please register or sign in to reply