Skip to content

Preparations for the IOT/ZT URLs migration#6266

Merged
sergei-maertens merged 3 commits into
stable/3.5.xfrom
feature/4939-iot-urls-migration-35x-branch
May 21, 2026
Merged

Preparations for the IOT/ZT URLs migration#6266
sergei-maertens merged 3 commits into
stable/3.5.xfrom
feature/4939-iot-urls-migration-35x-branch

Conversation

@sergei-maertens
Copy link
Copy Markdown
Member

@sergei-maertens sergei-maertens commented May 8, 2026

Closes #4939 (partly)

Changes

[skip: e2e]

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Checked new model fields are usable in the admin
    • Problem detection in the admin email digest is handled
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how
  • Documentation

@sergei-maertens sergei-maertens force-pushed the feature/4939-iot-urls-migration-35x-branch branch from 23c4ff2 to e2d300f Compare May 11, 2026 20:48
@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.11%. Comparing base (4e163a8) to head (e56f4e6).

Additional details and impacted files
@@               Coverage Diff                @@
##           stable/3.5.x    #6266      +/-   ##
================================================
+ Coverage         97.08%   97.11%   +0.03%     
================================================
  Files               885      887       +2     
  Lines             33501    33858     +357     
  Branches           3016     3079      +63     
================================================
+ Hits              32523    32880     +357     
  Misses              661      661              
  Partials            317      317              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sergei-maertens sergei-maertens force-pushed the feature/4939-iot-urls-migration-35x-branch branch from e2d300f to 6c1a8cf Compare May 15, 2026 16:37
The migrator migrates legacy URL references to document types and case
types to their 'pointers': the description of the document or the
identification of the case type, combined with the catalogue they
belong to (domain + rsin).

The migrator has a number of phases:

- file upload components processing (the shittiest / least complete)
- objects api registration backends
- zgw api registration backends
- objects API groups

**File upload components**

The registration options of a component may have an override for the
document type, stored as a URL reference. #6269 added support for
indirect references (catalogue + description). The migrator only
touches components that have a legacy URL and *no modern* config yet.
It looks up the catalogue + description of the document type and stores
it, but does not validate that this catalogue matches (all of) the
registration backend configuration, as that gets insanely complex and
will cause problems. The long term idea here is to *move* that config
from the component to the registration backend options itself anyway.

**Objects API registration backends**

Similarly here, there are three document types with a legacy and
modern config. We don't touch the modern config, if present. Legacy
URL references are resolved to their catalogue and description, and
the coherence of all resolved catalogues in the whole backend config
is checked (all documents must exist within the same catalog). If a
catalog is already configured in the options, it is taken into account.
If not, the catalog is written - we do not assume anything based on
the related API group and instead make the config explicit per form.

**ZGW API registration backends**

Similar to Objects API, except here we consider the case type and
document type references/legacy URLs. We don't touch modern config here
either, and again validate the coherence:

- doc type and case type must belong to the same catalogue, and match
  any pre-existing catalogue configuration
- the doc type must be related to the specified case type. This may be
  tricky based on validity dates of these objects and on which day the
  migration tool is ran, but failures during migration would probably
  also manifest at runtime

We don't touch the embedded object types configuration yet inside the
ZGW APIs - that's also legacy, but a modern alternative is not yet
available and honestly this migrator and commit message are huge
already.

**Objects API groups**

Also at the group level legacy URLs (and modern replacements) can be
present for the three relevant document types. These are updated the
same way like the backend options - don't touch modern config, and
resolve what is there to resolve and still missing.

A management command is added that runs in dry-run mode by default. It
just makes the changes and then rolls back the DB transaction - this
way you can dry-run and run it as a diagnostic tool to inform the
functional administrators which forms are problematic and need to be
fixed manually before the migration tool can run.

Backport-of: #6268
@sergei-maertens sergei-maertens force-pushed the feature/4939-iot-urls-migration-35x-branch branch from 6c1a8cf to 0f6af59 Compare May 21, 2026 15:29
(cherry picked from commit b54734b)
@sergei-maertens sergei-maertens marked this pull request as ready for review May 21, 2026 15:42
@sergei-maertens sergei-maertens merged commit 419f96c into stable/3.5.x May 21, 2026
26 checks passed
@sergei-maertens sergei-maertens deleted the feature/4939-iot-urls-migration-35x-branch branch May 21, 2026 16:07
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.

2 participants