Skip to content

Add tests for a particular use case of DH#6306

Merged
sergei-maertens merged 2 commits into
mainfrom
issue/dh-864-hhg-regression
May 26, 2026
Merged

Add tests for a particular use case of DH#6306
sergei-maertens merged 2 commits into
mainfrom
issue/dh-864-hhg-regression

Conversation

@sergei-maertens
Copy link
Copy Markdown
Member

Taiga DH 864

Changes

  • Added test with configuration and wrong expectations (expected failure)
  • Updated test with workaround to prevent the schema validation issue

I've also checked out the wrong expectation situation and reverted the #6007 fix locally, which produced a passing test:

diff --git a/src/openforms/registrations/contrib/objects_api/submission_registration.py b/src/openforms/registrations/contrib/objects_api/submission_registration.py
index d6129fd8e..9afc8d15c 100644
--- a/src/openforms/registrations/contrib/objects_api/submission_registration.py
+++ b/src/openforms/registrations/contrib/objects_api/submission_registration.py
@@ -474,7 +474,7 @@ class ObjectsAPIV2Handler(ObjectsAPIRegistrationHandler[RegistrationOptionsV2]):
 
         all_values = state.get_data(
             include_static_variables=True,
-            include_unsaved=True,
+            include_unsaved=False,
         )
         # update with the registration static values - a special subtype of static
         # variables. They're possibly derived from user input.
(open-forms) ➜  open-forms git:(06fd4fd92) ✗ runtests src -k test_conditional_fieldset_inside_repeating_group                                                                                                     
Found 1 test(s).
Using existing test database for alias 'default'...
System check identified no issues (0 silenced).
u
======================================================================
UNEXPECTED SUCCESS: test_conditional_fieldset_inside_repeating_group (openforms.registrations.contrib.objects_api.tests.test_backend_v2.ObjectsAPIBackendV2Tests.test_conditional_fieldset_inside_repeating_group)
----------------------------------------------------------------------
Ran 1 test in 0.659s

FAILED (unexpected successes=1)
Preserving test database for alias 'default'...

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

[skip: e2e]

@codecov
Copy link
Copy Markdown

codecov Bot commented May 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.10%. Comparing base (66689e4) to head (3335a97).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6306   +/-   ##
=======================================
  Coverage   97.10%   97.10%           
=======================================
  Files         869      869           
  Lines       33147    33147           
  Branches     3048     3048           
=======================================
  Hits        32189    32189           
  Misses        646      646           
  Partials      312      312           

☔ 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.

Note that we expect this test to fail, because the expected behaviour from
DH is really the wrong behaviour - we output all the variables all the
time until #6012 is addressed.

There are two issues happening here that get mixed up:

* (not a real issue) the hidden variables are also mapped and present in
  the output, while that's not expected
* there's a nested structure in the form UI that is expected to be kept
  when outputting to the Objects API, but layout components have no
  presence in the data. This has been explained and is the root cause.

The JSON schema *does* expect the key to be present in the situation that
DH is experiencing, however it should be in a nested level rather than
the top level. I think we can handle that with clever component key
naming.

The change between 3.3 and 3.4 here is that the hidden fields are in
the output, which traces back to the whole DISABLE_SENDING_HIDDEN_FIELDS
flag for Objects API v1. This is a side-effect of the internal data
structures rework for the performance rework and we cannot simply
revert this. Furthermore, we had to do a hotfix in #6007 *because*
the hidden fields were not sent. In 3.3 the hidden data would just
not be present in each item, and therefore be omitted. Similarly,
for skipped steps, the data didn't exist in the database and would
be skipped.

In 3.4, we build up the submission data differently and get back
'virtual' data for variables that don't exist in the database, which
results in these keys being present in the output.
@sergei-maertens sergei-maertens force-pushed the issue/dh-864-hhg-regression branch from d469d31 to 3335a97 Compare May 22, 2026 21:51
Copy link
Copy Markdown
Contributor

@viktorvanwijk viktorvanwijk left a comment

Choose a reason for hiding this comment

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

After reading up on the problem in Taiga: makes sense :)

@sergei-maertens sergei-maertens merged commit f73c453 into main May 26, 2026
30 of 31 checks passed
@sergei-maertens sergei-maertens deleted the issue/dh-864-hhg-regression branch May 26, 2026 11:33
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