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

✨ [#4788] ConfigurationStep for Objects API registration config #4822

Merged
merged 16 commits into from
Dec 6, 2024

Conversation

stevenbal
Copy link
Contributor

@stevenbal stevenbal commented Nov 12, 2024

Closes #4787

Changes

  • ConfigurationStep for Objects API registration config
  • Add identifier to ObjectsAPIGroupConfig

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
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Commit hygiene

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

@stevenbal stevenbal marked this pull request as draft November 12, 2024 14:37
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (26615d1) to head (07c23a6).
Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4822   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files         752      754    +2     
  Lines       25809    25853   +44     
  Branches     3411     3415    +4     
=======================================
+ Hits        24932    24976   +44     
  Misses        613      613           
  Partials      264      264           

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

@stevenbal stevenbal force-pushed the feature/setup-configuration branch from dfdfd01 to c52c208 Compare November 12, 2024 15:27
@stevenbal stevenbal changed the title 📌 [#4788] Pin zgw-consumers to branch ✨ [#4788] ConfigurationStep for Objects API registration config Nov 12, 2024
@stevenbal stevenbal force-pushed the feature/setup-configuration branch 6 times, most recently from 1fe35d5 to a4fde34 Compare November 15, 2024 15:05
@stevenbal
Copy link
Contributor Author

stevenbal commented Nov 15, 2024

@sergei-maertens this PR of course depends on the changes in django-setup-configuration and zgw-consumers, but I figured it would be good if you could take a look at the implementation before I start working on #4789

@stevenbal stevenbal force-pushed the feature/setup-configuration branch 2 times, most recently from b49b89b to e70f68a Compare November 19, 2024 14:18
@stevenbal stevenbal marked this pull request as ready for review November 19, 2024 14:18
@stevenbal stevenbal marked this pull request as draft November 19, 2024 14:20
@stevenbal stevenbal force-pushed the feature/setup-configuration branch 5 times, most recently from 0c8a7cb to 3821f26 Compare November 25, 2024 15:48
@stevenbal stevenbal force-pushed the feature/setup-configuration branch 3 times, most recently from ecfece5 to 67390e6 Compare December 2, 2024 10:19
@stevenbal stevenbal force-pushed the feature/setup-configuration branch 4 times, most recently from 5cb5618 to 4f92c5b Compare December 3, 2024 13:54
@stevenbal stevenbal force-pushed the feature/setup-configuration branch from 4f92c5b to 0d16714 Compare December 3, 2024 14:01
@stevenbal
Copy link
Contributor Author

I've created a separate issue for the documentation (for all config steps) #4882

@stevenbal stevenbal marked this pull request as ready for review December 3, 2024 14:18
Dockerfile Show resolved Hide resolved
bin/docker_start.sh Show resolved Hide resolved
bin/setup_configuration.sh Show resolved Hide resolved
bin/setup_configuration.sh Show resolved Hide resolved
bin/wait_for_db.sh Outdated Show resolved Hide resolved
docs/installation/config.rst Outdated Show resolved Hide resolved
src/openforms/contrib/objects_api/tests/factories.py Outdated Show resolved Hide resolved
src/openforms/contrib/objects_api/tests/test_migrations.py Outdated Show resolved Hide resolved
this is needed to load the Services required to setup configuration such as ObjectsAPIGroupConfig, etc.
add a web-init container and the required scripts for setup_configuration. Example data has been added to docker/setup_configuration
this step relies on the previously added ServiceConfigurationStep and can be used to set up the necessary configuration for the Objects API registration backend
to avoid having to bring up the Open Zaak and Objects/Objecttypes docker compose stacks for the CI tests to simulate upgrading Open Forms
to make sure there is a unique field that can be used to refer to the groups and identify them when they are loaded using setup-configuration
* Make Documenten and Catalogi API optional in config model
* Add identifier
* Use lowercase namespaces
* Remove is_configured and validate_result
* add tests for required fields, all fields and idempotency
* Rename service_slug to service_identifier
identifiers were added instead of slugs, and the selftest functionality has been removed
since this is all tightly coupled with the objects API models, the steps and models should be defined there as well
* setup_configuration now only takes one yaml file as a source
* remove legacy `is_configured` and `validate_result` hooks
* change testing utils
currently django_model_refs are not recognized as attributes on the model, an upstream issue has been created for this
@stevenbal stevenbal force-pushed the feature/setup-configuration branch from 0d16714 to edd2b72 Compare December 6, 2024 14:21
Copy link
Member

@sergei-maertens sergei-maertens left a comment

Choose a reason for hiding this comment

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

Last polishing items, after that it's good to merge!

bin/docker_start.sh Outdated Show resolved Hide resolved

if [[ "${RUN_SETUP_CONFIG,,}" =~ ^(true|1|yes)$ ]]; then
# wait for required services
/wait_for_db.sh
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
/wait_for_db.sh
./wait_for_db.sh

these scripts need to be debugged outside of docker context too, so you can't assume that they're available in the root of the system.

* add type: ignore to specific lines in steps.py instead of ignoring entire file with pyright
* several docs improvements
* remove unused SCRIPTPATH variable in wait_for_db.sh and setup_configuration.sh
* move tests to objects_api.tests directory
@stevenbal stevenbal force-pushed the feature/setup-configuration branch from edd2b72 to 07c23a6 Compare December 6, 2024 15:26
@sergei-maertens sergei-maertens merged commit ae74347 into master Dec 6, 2024
17 of 18 checks passed
@sergei-maertens sergei-maertens deleted the feature/setup-configuration branch December 6, 2024 15:28
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.

Add support for Object API-groups via django-setup-configuration
3 participants