Skip to content

Migrate API groups configuration to backend options#6305

Open
sergei-maertens wants to merge 7 commits into
mainfrom
feature/4939-migrate-objects-api-groups-to-backend-options
Open

Migrate API groups configuration to backend options#6305
sergei-maertens wants to merge 7 commits into
mainfrom
feature/4939-migrate-objects-api-groups-to-backend-options

Conversation

@sergei-maertens
Copy link
Copy Markdown
Member

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

Partly closes #4939 - best to get #6309 merged first

Changes

  • Added data migration for Objects API group options
  • Added data migration for ZGW API group options
  • Remove/hide legacy/obsoleted configuration fields

[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

    • Added documentation which describes the changes

@codecov
Copy link
Copy Markdown

codecov Bot commented May 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.99%. Comparing base (f9695ad) to head (a3415b8).
⚠️ Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6305      +/-   ##
==========================================
- Coverage   97.07%   96.99%   -0.09%     
==========================================
  Files         866      864       -2     
  Lines       32755    32674      -81     
  Branches     2981     2966      -15     
==========================================
- Hits        31797    31692     -105     
- Misses        646      668      +22     
- Partials      312      314       +2     

☔ 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
Copy link
Copy Markdown
Member Author

sergei-maertens commented May 20, 2026

Import/export of (old) forms exports can't be addressed here, because the API group is not present in the export and we're removing these fields from the existing groups. Users will need to re-generate the exports on 4.0.

@sergei-maertens sergei-maertens force-pushed the feature/4939-migrate-objects-api-groups-to-backend-options branch 2 times, most recently from c01fcd6 to 717e154 Compare May 20, 2026 20:43
@sergei-maertens sergei-maertens marked this pull request as ready for review May 21, 2026 16:20
@sergei-maertens sergei-maertens force-pushed the feature/4939-migrate-objects-api-groups-to-backend-options branch from a3415b8 to a4e3c01 Compare May 21, 2026 16:21
@sergei-maertens sergei-maertens requested a review from SonnyBA May 21, 2026 16:21
@sergei-maertens
Copy link
Copy Markdown
Member Author

sergei-maertens commented May 21, 2026

@SonnyBA this follows up on #6268, though before merging this I want to run the migrator tool on our test env and implement the upgrade check 😉

I analyzed our SAAS test and production environments and the conclusion is
that barely anyone is using the catalogue configuration on the API group
level (Objects API, ZGW). Most select the catalogue in the registration
backend options. I can't tell what the situation is for on-prem
environments due to not having access.

This layering of catalogue information/defaults leads to a lot of
complexity in the code base, and I believe we can safely migrate this
automatically, given that:

1. Users are expected to use 3.5 to convert legacy URL configuration
   into modern configuration (catalogue + references)
2. 4.0 is already known to drop support for legacy URLs, so we can
   assume we only have to deal with modern configs
3. With no-one known to use legacy URLs (at the API group level), we
   don't need to do anything about the document description fields.
   Though, we can hide those in the admin and keep the runtime code
   from resolving them when they're set as a default, if that makes
   sense
4. A data migration can copy the group-level catalogue to each
   registration backend that uses this API group, but only if no
   explicit catalogue override is specified. Legacy URL migration
   during 3.5 will likely have populate a bunch already, so we expect
   this to have negligible impact. Only empty-ish configuration would
   get updated that relied on defaults, and we can copy all those over.

This makes the migration and future enhancement a lot more manageable,
which they currently aren't and block me for #6281
This is simpler because there are no case type or document type defaults
at the group level, only the catalogue is relevant to be copied over.
A similar but simpler approach to the Objects API groups. In practice,
the migration tool from 3.5 will likely already have set the catalogue
on most, if not all backends, but it's good to make sure this is
covered for unexpected edge cases.
This is obsoleted now that the catalogue is always stored in
the registration backend options.
…API Group level

This drops the support for the catalogue references and/or
document type (defaults) at the API group level. The 3.5
release provides migration tooling and we ship a data
migration that moves all configuration into the
registration backend options instead.
The 4.0 upgrades will run a modified version of the migration tool as
an upgrade check. To be able to detect unmigrated backends and API
groups, we must still be able to query the legacy fields using the
real models, which requires the field definitions to still be on the
model.
@sergei-maertens sergei-maertens force-pushed the feature/4939-migrate-objects-api-groups-to-backend-options branch from a4e3c01 to 73c0c36 Compare May 22, 2026 21:51
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.

Remove legacy zaaktype/documenttype URL fields in registration backends

1 participant