Skip to content

4.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 11 Nov 15:39
692eba9

4.1.0 (#1090)

  • Bump certifi from 2025.4.26 to 2026.10.18

Bumps certifi from 2025.4.26 to 2026.10.18.


updated-dependencies:

  • dependency-name: certifi
    dependency-version: 2026.10.18
    dependency-type: direct:production
    ...

Signed-off-by: dependabot[bot] support@github.com

  • Bump setuptools from 80.9.0 to 84.1.0

Bumps setuptools from 80.9.0 to 84.1.0.


updated-dependencies:

  • dependency-name: setuptools
    dependency-version: 84.1.0
    dependency-type: direct:production
    ...

Signed-off-by: dependabot[bot] support@github.com

  • Bump djangorestframework from 3.17.2 to 3.18.2

Bumps djangorestframework from 3.17.2 to 3.18.2.


updated-dependencies:

  • dependency-name: djangorestframework
    dependency-version: 3.18.2
    dependency-type: direct:production
    ...

Signed-off-by: dependabot[bot] support@github.com

  • Optional ADMIN_THEME setting to customize admin colors (#1066)

  • REST: writable water restrictions endpoints (#1076)

  • REST: writable water restrictions endpoints

  • REST: expose read-only implant_weight on water restrictions

  • REST: other actions endpoints (#1077)

  • REST: other actions endpoints, link other action admin rows to the record

  • REST: drop project specific validation from other actions

  • REST: housing and housing-subjects endpoints (#1078)

  • Data notice improvements (#1088)

  • Remove datasets from data notice serializer

  • 10–35x performance increase of sessions and insertions detail

I've fixed data_url. Session detail and probe insertion detail now make a fixed number of queries however many datasets they contain, and both are 10–35× faster at 2,000 datasets.

I benchmarked the original code (d4e611fc) against the current tree through the full request on local Postgres. Each dataset had 3 file records, mirroring production (flatiron_* and aws_* with a URL, plus a personal lab server). 5% of datasets were not yet on the server, and two notices were attached.

Session detail (sessions/<eid>):

Datasets Queries Time (local) Time (+1 ms per query) Peak memory
100 208 → 20 360 → 36 ms 723 → 70 ms 1.7 → 1.5 MB
500 968 → 20 1,266 → 116 ms 2,890 → 135 ms 7.7 → 7.0 MB
2,000 3,818 → 20 5,278 → 373 ms 13,028 → 392 ms 30.2 → 27.6 MB

Probe insertion detail (insertions/<id>):

Datasets Queries Time (local) Time (+1 ms per query) Peak memory
100 196 → 9 167 → 20 ms 604 → 34 ms 0.5 → 1.0 MB
500 956 → 9 1,107 → 66 ms 2,931 → 94 ms 1.9 → 4.5 MB
2,000 3,806 → 9 5,500 → 228 ms 13,641 → 229 ms 6.8 → 17.9 MB
  • The "+1 ms per query" column adds a simulated database round trip, which is where per-dataset queries hurt most on a real server.

  • The new session numbers include the data_notices field, which the original doesn't have.

  • On production today, session detail for mesoscope sessions takes 2.8 s for 197 datasets and 4.2 s for 254. That fits this per-dataset query pattern, so I'd expect a similar drop there, but I haven't measured it on production.

  • What was wrong: Dataset.data_url always ran a fresh query, ignoring any preloaded file records. It then ran a second query for .order_by(...)[0], so each dataset with a URL cost 2 queries. Session detail already preloaded every file record and never used them, paying the memory cost and the query cost.

  • What it does now: it reads file_records.all(), which uses the preloaded records, and picks the best record in Python from about 3 records per dataset. Without preloading, it costs 1 query per dataset instead of 2.

  • Same choice as before: non-personal repositories first, then reverse name order, with a null globus_is_personal last as in Postgres. I ran the new ordering test against the original code and it passes there too.

  • One caveat: Postgres sorts names by its collation, while Python sorts by code point. All 26 production repositories with a URL are lowercase aws_* or flatiron_*, so flatiron_* still wins wherever both exist.

  • Probe insertion detail now preloads its file records.

  • FileRecord.data_url uses dataset_id, which can never trigger a query.

  • Set REST throttle rates for specific views and actions in settings (#1083)

  • Set REST throttle rates for specific views and actions in settings

  • Update changelog and run CI on PRs into release branches

  • Update CHANGELOG


Signed-off-by: dependabot[bot] support@github.com
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Olivier Winter olivier.winter@hotmail.fr