Skip to content
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

[#2587] Require all services except forms in ZGWApiGroupConfig #1278

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

swrichards
Copy link
Collaborator

@swrichards swrichards commented Jun 25, 2024

Note that the changes in the test files were necessary because the OpenZaakConfig legacy getter/setter methods relied on most services being nullable, enabling it to dynamically create each missing service as it was set. That is obviously no longer possible, so now you'll see a lot of:

ZGWApiGroupConfigFactory(
  ztc_service__api_root=CATALOGI_ROOT,
  zrc_service__api_root=ZAKEN_ROOT,
  form_service=None,
)

in place of

self.config = OpenZaakConfig.get_solo()
self.config.zaak_service = ServiceFactory(api_root=ZAKEN_ROOT, api_type=APITypes.zrc)
self.config.catalogi_service = ServiceFactory(api_root=CATALOGI_ROOT, api_type=APITypes.ztc)
self.config.save()       

This also functions as a general cleanup to pave the way for the coming changes: the test setups would've had to evolve eventually anyway, and this will make the logic around multiple backends a bit easier.

Taiga: #2587

@swrichards swrichards force-pushed the tasks/2587-require-most-zgw-api-group-services branch 7 times, most recently from 3c68fab to 6302cf8 Compare June 26, 2024 10:36
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2024

Codecov Report

Attention: Patch coverage is 97.46835% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.14%. Comparing base (4b02eb4) to head (3b4c573).

Files Patch % Lines
src/open_inwoner/cms/cases/tests/test_htmx.py 0.00% 1 Missing ⚠️
src/open_inwoner/openzaak/models.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1278      +/-   ##
===========================================
- Coverage    95.17%   95.14%   -0.04%     
===========================================
  Files          981      982       +1     
  Lines        35665    35626      -39     
===========================================
- Hits         33945    33896      -49     
- Misses        1720     1730      +10     

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

@swrichards swrichards marked this pull request as ready for review June 26, 2024 11:42
@swrichards swrichards requested a review from pi-sigma June 26, 2024 11:42
@swrichards swrichards force-pushed the tasks/2587-require-most-zgw-api-group-services branch 2 times, most recently from dfbb88d to 2a6861b Compare June 26, 2024 14:43
@swrichards swrichards force-pushed the tasks/2587-require-most-zgw-api-group-services branch from 2a6861b to 3b4c573 Compare June 26, 2024 14:44
@swrichards swrichards requested a review from pi-sigma June 26, 2024 14:44
@swrichards swrichards requested a review from alextreme June 26, 2024 14:53
Copy link
Member

@alextreme alextreme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good cleanup and helps to avoid inconsistent configuration

@alextreme alextreme merged commit e8c25b1 into develop Jun 26, 2024
16 checks passed
@alextreme alextreme deleted the tasks/2587-require-most-zgw-api-group-services branch June 26, 2024 18:35
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.

4 participants