-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#2526] Allow for additional ZGW service backends to be configured #1240
Conversation
caca0df
to
0fdb750
Compare
|
||
dependencies = [ | ||
("zgw_consumers", "0019_alter_service_uuid"), | ||
("openzaak", "0047_delete_statustranslation"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note we depend on 0047
rather than 0048
on account of #1228
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1240 +/- ##
===========================================
- Coverage 95.22% 95.20% -0.03%
===========================================
Files 974 978 +4
Lines 35471 35595 +124
===========================================
+ Hits 33778 33888 +110
- Misses 1693 1707 +14 ☔ View full report in Codecov by Sentry. |
4adab74
to
1b32755
Compare
1b32755
to
715bc06
Compare
715bc06
to
bd2e67b
Compare
Seems okay, also for @pi-sigma to review first after his holiday |
@stevenbal review vanuit jouw kant zou wenselijk zijn hiervoor, dit hadden we volgens mij in april samen met Bart al voorbesproken maar lag even stil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor remarks, looks good overall 👍
open_zaak_config = models.ForeignKey( | ||
"openzaak.OpenZaakConfig", on_delete=models.PROTECT, related_name="api_groups" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OpenZaakConfig
is a SingletonModel
and there will only be one instance of it, so I don't think we need a ForeignKey
to it on this model and can just use .get_solo
if we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The FK approach feels simpler and cheaper to me: it's more declarative and avoids custom logic on both sides of the relation (.get_solo
and ZGWApiGroupConfig.objects.all()
) and in the admin (which would be needed because we would lack a declared through-field). But if you feel strongly the other way I am happy to make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah that's true, I don't feel too strongly about either way, so it's fine
src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py
Show resolved
Hide resolved
src/open_inwoner/openzaak/migrations/0050_migrate_zgw_root_fields_to_multi_backend.py
Show resolved
Hide resolved
Useful comments @stevenbal, thanks. Just one open question left in #1240 (comment). |
bd2e67b
to
e41c456
Compare
This is a first step towards allowing multiple ZGW backends throughout the platform. To maintain backwards compatibility with the current datamodel, we proxy the current service config fields to the new ZGWApiGroupConfig model as we work our way towards making all ZGW client invocations multi-backend aware.
e41c456
to
dc065b0
Compare
This is a first step towards allowing multiple ZGW backends throughout the platform. To maintain backwards compatibility with the current datamodel, we proxy the current service config fields to the new ZGWApiGroupConfig model as we work our way towards making all ZGW client invocations multi-backend aware.