Repository navigation
fix(processing): keep JSON Operations inputs visible after Update Component - #15833
Merged
Merged
Conversation
…ponent
Updating an outdated JSON Operations node (the legacy DataOperations
component) rebuilt its template from class defaults, where every
operation field is hidden. The generic merge restores only values, so the
selected operation's input disappeared from the node and the graph build
skipped it. A Select Keys ['text'] node then returned {} instead of the
selected key.
Re-apply the saved operation's field visibility and data.is_list in
update_frontend_node, and rebuild the Path Selection dropdown options from
the saved JSON. Saved values are left untouched. This ports the Data
Operations fix from #15812.
Contributor
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 3
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
erichare
marked this pull request as ready for review
October 17, 2026 14:48
Contributor
✅ Test Coverage AdvisorNo source changes detected without accompanying tests. Thanks for keeping coverage up! 🎉
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-1.13.0 #15833 +/- ##
==================================================
+ Coverage 69.51% 70.85% +1.33%
==================================================
Files 2788 2798 +10
Lines 303015 303080 +65
Branches 45155 44246 -909
==================================================
+ Hits 210644 214750 +4106
+ Misses 89877 85836 -4041
Partials 2494 2494 🚀 New features to boost your workflow:
|
erichare
added a commit
that referenced
this pull request
Oct 17, 2026
…vas reads (#15836) * fix(processing): set the JSON input's list flag under the key the canvas reads Operations and the legacy JSON Operations component mean to let only the Combine operation take several JSON edges. They wrote data["is_list"], but the serialized template stores that flag as "list", and the canvas and the graph read only "list". The flag stayed at its class default (True), so every operation accepted several edges, and a single-input operation such as Select Keys failed at run time with "not supported for multiple data objects" instead of refusing the second edge on the canvas. The stray is_list key was also saved into flows. Write "list" and drop any is_list left by an earlier save. This covers operation changes and the Update Component path in both components, including the JSON Operations update_frontend_node added in #15833. Regenerate the component index. * fix(processing): fail when several JSON edges feed a single-input operation A node keeps its edges when its operation changes, and nothing prunes extra edges when the JSON input stops being a list. With "list" false the graph passes only the last edge's data, so a node switched from Combine to Select Keys would run on partial input and report no error. Count the node's incoming "data" edges before running any operation other than Combine, and raise the existing "not supported for multiple data objects" error when there is more than one. This also covers Path Selection and JQ Expression, which used only the first item of a list. Regenerate the component index.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Clicking Update on a saved JSON Operations node (the legacy
DataOperationsComponent) hides the selected operation's inputs. The node keeps its operation and saved values, but the field disappears, and the graph build skips hidden fields. A Select Keys['text']node then returns{}instead of{"text": ...}, with no error.The cause is the same one #15812 fixed for Data Operations.
update_frontend_noderebuilds the template from class defaults, where every operation field hasshow=False. The generic merge copies back values only, so nothing re-applies visibility.This adds an
update_frontend_nodeoverride toDataOperationsComponent, following the #15812 pattern inoperations.py:template["operations"]["value"].actions_data. Hide the rest ofALL_OPERATION_FIELDS. Saved values are not touched.data.is_listfromACTION_CONFIG, asupdate_build_configdoes.selected_keydropdown options from the savedmapped_json_display. Hideselected_keyif the saved JSON does not parse.No operation, more than one, or a removed one such as
Filter Valuesleaves every operation field hidden. That matches whatupdate_build_configproduces.The component index entry for
DataOperationsComponent(code andcode_hash) is regenerated.Found by the 1.13.0rc1 smoke test. The bug is also in 1.12.6, so it is not an rc1 regression.
Tests
New class
TestUpdateFrontendNodeRestoresVisibilityinsrc/backend/tests/unit/components/processing/test_data_operations_component.py. Each test builds a node the way the canvas saves it, by running the component's ownupdate_build_configfor the chosen operation and values. It then puts that node through the Update path: a fresh class-default template plusupdate_frontend_node.actions_data: the visible operation fields after Update match that operation's fields and the saved node's flags.data.is_listmatchesACTION_CONFIG.['text']survives Update.Filter Valuesoperation, keeps all operation fields hidden.selected_keyoptions back. Invalid saved JSON keepsselected_keyhidden.Graph.from_payload, soParameterHandlerdrops hidden fields just as it does in a real run.Verification
The index was regenerated with
LFX_DEV=1 uv run python scripts/build_component_index.py. The local venv had numpy 2.5.1, whileuv.lockpins 2.4.6. That changed three unrelated numpy dependency entries, so I reverted them and recomputed the indexsha256with the script's method. The same method reproduces the committed checksum onrelease-1.13.0.Not verified: clicking Update in the browser. The tests call the same two functions the
/api/v1/custom_componentendpoint calls:build_custom_component_template, thenupdate_frontend_node.Open questions
update_build_config(here and inoperations.py) setsdata["is_list"], but the serialized template key islist, and nothing on the canvas or inParameterHandlerreadsis_list. So the Combine-versus-single-input switch may never reach the canvas handle. This PR restoresis_listthe same way the existing code writes it, to keep the port faithful. Switching tolistwould change handle behavior and deserves its own PR.