Skip to content

fix: Conditional params safeguard (HEXA-1687)#402

Merged
mrivar merged 1 commit into
mainfrom
HEXA-1687-conditional-params-fix
Jun 23, 2026
Merged

fix: Conditional params safeguard (HEXA-1687)#402
mrivar merged 1 commit into
mainfrom
HEXA-1687-conditional-params-fix

Conversation

@mrivar

@mrivar mrivar commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Fixing bug in https://github.com/BLSQ/snt_development/actions/runs/27815160427/job/82314423275

❌ Error while importing pipeline: "[{'message': "Variable '$input' got invalid value 
{'code': 'dhis2_connection', 'type': 'dhis2', 'name': 'DHIS2 connection', 'choices': None, 
'help': 'DHIS2 connection ID', ..., 'multiple': False, 'directory': None, 'disables': None, 
'disableWhen': True} at 'input.parameters[0]'; Field 'disables' is not defined by type 
'ParameterInput'.", 'locations': [{'line': 2, 'column': 37}]}, {'message': "Variable '$input' 
got invalid value {'code': 'dhis2_connection', 'type': 'dhis2', 'name': 'DHIS2 connection', 
'choices': None, 'help': 'DHIS2 connection ID', ..., 'multiple': False, 'directory': None, 
'disables': None, 'disableWhen': True} at 'input.parameters[0]'; Field 'disableWhen' is 
not defined by type 'ParameterInput'."

Changes

The root cause was a payload field the server's ParameterInput doesn't define.

  • This safeguard will add only the new values (disables and disableWhen) when they actually exist, thus avoiding having issues with unupdated openhexa instances.
  • Added tests to ensure this doesn't happen in the future

@mrivar mrivar requested a review from bramj June 19, 2026 09:41
@mrivar mrivar self-assigned this Jun 19, 2026
@mrivar mrivar changed the title fix: conditional params safeguard fix: conditional params safeguard (HEXA-1687) Jun 19, 2026
@mrivar mrivar changed the title fix: conditional params safeguard (HEXA-1687) fix: Conditional params safeguard (HEXA-1687) Jun 19, 2026

@bramj bramj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@mrivar mrivar merged commit b4ffc79 into main Jun 23, 2026
6 checks passed
@mrivar mrivar deleted the HEXA-1687-conditional-params-fix branch June 23, 2026 08:05
@blsqbot blsqbot mentioned this pull request Jun 23, 2026
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