feat(ui): workflow schema v3 (WIP) #5707
Closed
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.
What type of PR is this? (check all applicable)
TODO
Workflow Schema v3
The changes aim to deduplicate data between workflows and node templates, decoupling workflows from internal implementation details. A good amount of data that was needlessly duplicated from the node template to the workflow is removed.
These changes substantially reduce the file size of workflows (and therefore the images with embedded workflows):
The trade-off is that we need to reference node templates to get things like the field type and other things. In practice, this is a non-issue, because we need a node template to do anything with a node anyways.
Schema Deduplication Changes
The field type is now properly an internal implementation detail and we can change it as needed. Previously this would require a migration for the workflow itself. With the v3 schema, the structure of a field type is an internal implementation detail that we are free to change as we see fit.
outputsproperty and there is no longer such a thing as aFieldOutputInstance. These are only on the templates.These were never referenced at a time when we didn't also have the templates available, and there'd be no reason to do so.
These weren't used. Also, per https://reactflow.dev/api-reference/types/node, we shouldn't be programmatically changing these properties. A future enhancement can properly add node resizing.
Other Changes
nodeTemplatesslice is merged back intonodesSliceasnodes.templates. Turns out it's just a hassle having these separate in separate slices.Workflow migration logic updated to support the new schema. V1 workflows migrate all the way to v3 now.
Changes throughout the nodes code to accommodate the above changes.
Related Tickets & Documents
QA Instructions, Screenshots, Recordings
Merge Plan
Added/updated tests?
have not been included
[optional] Are there any post deployment tasks we need to perform?