Skip to content

support sub flows#980

Merged
Taucher2003 merged 13 commits into
mainfrom
#931-support-sub-flows
May 25, 2026
Merged

support sub flows#980
Taucher2003 merged 13 commits into
mainfrom
#931-support-sub-flows

Conversation

@raphael-goetz
Copy link
Copy Markdown
Member

Resolves: #931

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 21, 2026

GitLab Pipeline Action

General information

Link to pipeline: https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2551267946

Status: Passed
Duration: 6 minutes

Job summaries

rspec: [cloud]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14531371082/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2551267946/test_report
Finished in 24.82 seconds (files took 10.77 seconds to load)
1476 examples, 0 failures
Line Coverage: 92.7% (5045 / 5442)
[TEST PROF INFO] Time spent in factories: 00:15.500 (50.28% of total time)

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14531371081/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2551267946/test_report
Finished in 23.85 seconds (files took 12.21 seconds to load)
1440 examples, 0 failures
Line Coverage: 92.92% (4892 / 5265)
[TEST PROF INFO] Time spent in factories: 00:14.840 (47.61% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/14531371080/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2551267946/test_report
Finished in 22.84 seconds (files took 10.7 seconds to load)
1390 examples, 0 failures
Line Coverage: 92.42% (4716 / 5103)
[TEST PROF INFO] Time spent in factories: 00:14.425 (50.29% of total time)

docs:preview

Documentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14531399262/artifacts/out/index.html

rubocop

841 files inspected, no offenses detected

@raphael-goetz raphael-goetz marked this pull request as ready for review May 21, 2026 19:17
Copilot AI review requested due to automatic review settings May 21, 2026 19:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR replaces the old “function value” (NodeFunctionIdWrapper / node_functions.value_of_node_parameter) mechanism with a first-class SubFlow model that can be used as a node-parameter value, and wires it through GraphQL, persistence, and gRPC serialization. It also adds an optional cast field to flow settings and node parameters.

Changes:

  • Introduces SubFlow + SubFlowSetting models, tables, factories, and specs; updates NodeParameter to use sub_flow instead of function_value.
  • Updates Flow create/update GraphQL inputs and response unions to accept/return subFlow values (and removes NodeFunctionIdWrapper).
  • Adds cast to flow_settings and node_parameters (GraphQL + persistence + gRPC), plus docs updates.

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
spec/requests/graphql/mutation/namespace/projects/flows/update_mutation_spec.rb Updates mutation spec to send/expect subFlow parameter values
spec/requests/graphql/mutation/namespace/projects/flows/create_mutation_spec.rb Updates mutation spec to send/expect subFlow parameter values
spec/models/sub_flow_spec.rb New model spec for SubFlow associations/validation
spec/models/sub_flow_setting_spec.rb New model spec for SubFlowSetting associations/validation
spec/models/node_parameter_spec.rb Replaces function_value expectations with sub_flow
spec/models/node_function_spec.rb Removes value_of_node_parameter association expectations
spec/factories/sub_flows.rb Adds factory for SubFlow
spec/factories/sub_flow_settings.rb Adds factory for SubFlowSetting
spec/factories/node_parameters.rb Removes function_value factory attribute
spec/factories/node_functions.rb Removes value_of_node_parameter factory attribute
docs/graphql/union/nodeparametervalue.md Documents FlowSubFlow as a possible union type
docs/graphql/object/nodeparameter.md Documents new cast field on NodeParameter
docs/graphql/object/nodefunctionidwrapper.md Removes docs for deprecated NodeFunctionIdWrapper
docs/graphql/object/flowsubflowsetting.md Adds docs for FlowSubFlowSetting
docs/graphql/object/flowsubflow.md Adds docs for FlowSubFlow
docs/graphql/object/flowsetting.md Documents new cast field on FlowSetting
docs/graphql/input_object/nodeparametervalueinput.md Replaces nodeFunctionId with subFlow input
docs/graphql/input_object/nodeparameterinput.md Documents new cast input
docs/graphql/input_object/flowsubflowsettinginput.md Adds docs for FlowSubFlowSettingInput
docs/graphql/input_object/flowsubflowinput.md Adds docs for FlowSubFlowInput
docs/graphql/input_object/flowsettinginput.md Documents new cast input on FlowSettingInput
docs/graphql/enum/errorcodeenum.md Removes FUNCTION_VALUE_NOT_FOUND from documented error codes
db/structure.sql Reflects schema changes: new tables + cast columns + removed FK/index
db/schema_migrations/20260520120000 Adds checksum entry for the new migration
db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Adds cast columns, creates sub_flow tables, removes old reference
app/services/namespaces/projects/flows/update_service.rb Implements cast handling and subFlow update/clear logic
app/services/error_code.rb Removes obsolete function_value_not_found error code
app/models/sub_flow.rb New SubFlow model with gRPC conversion + validation
app/models/sub_flow_setting.rb New SubFlowSetting model with gRPC conversion
app/models/node_parameter.rb Switches from function_value to sub_flow; adds cast to gRPC
app/models/node_function.rb Removes value_of_node_parameter association
app/models/flow_setting.rb Adds cast to gRPC serialization
app/graphql/types/node_parameter_value_type.rb Updates union to include FlowSubFlow and resolve SubFlow
app/graphql/types/node_parameter_type.rb Adds cast field; returns sub_flow as the parameter value
app/graphql/types/node_function_id_wrapper_type.rb Removes deprecated GraphQL type
app/graphql/types/input/node_parameter_value_input_type.rb Replaces nodeFunctionId with subFlow; updates one-of validation
app/graphql/types/input/node_parameter_input_type.rb Adds cast input
app/graphql/types/input/flow_sub_flow_setting_input_type.rb Adds input type for sub-flow settings
app/graphql/types/input/flow_sub_flow_input_type.rb Adds input type for sub-flow values
app/graphql/types/input/flow_setting_input_type.rb Adds cast input for flow settings
app/graphql/types/flow_sub_flow_type.rb Adds GraphQL object type for FlowSubFlow
app/graphql/types/flow_sub_flow_setting_type.rb Adds GraphQL object type for FlowSubFlowSetting
app/graphql/types/flow_setting_type.rb Adds cast field to FlowSetting GraphQL type

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/services/namespaces/projects/flows/update_service.rb Outdated
Comment thread app/services/namespaces/projects/flows/update_service.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb
Comment thread app/graphql/types/input/sub_flow_value_setting_input_type.rb
Comment thread app/graphql/types/input/sub_flow_value_setting_input_type.rb
Comment thread app/graphql/types/input/sub_flow_value_setting_input_type.rb
Comment thread app/graphql/types/input/sub_flow_value_input_type.rb
Comment thread app/models/node_parameter.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Outdated
raphael-goetz and others added 4 commits May 24, 2026 10:24
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 2 comments.

Comment thread app/services/namespaces/projects/flows/update_service.rb Outdated
Comment thread spec/factories/sub_flows.rb
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Comment thread app/graphql/types/flow_sub_flow_type.rb Outdated
Comment thread app/models/sub_flow_setting.rb Outdated
Comment thread app/services/namespaces/projects/flows/update_service.rb Outdated
Comment thread db/migrate/20260520120000_add_tucana_shared_flow_sub_flows.rb Outdated
raphael-goetz and others added 4 commits May 25, 2026 14:59
Co-authored-by: Niklas van Schrick <mc.taucher2003@gmail.com>
Signed-off-by: Raphael Götz <52959657+raphael-goetz@users.noreply.github.com>
Copy link
Copy Markdown
Member

@nicosammito nicosammito left a comment

Choose a reason for hiding this comment

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

Just some naming stuff:

FlowSubFlow -> SubFLowValue
FlowSubFlowSetting -> SubFlowValueSetting
NodeParameterValueInput.subFlow -> NodeParameterValueInput.subFlowValue
FlowSubFlowInput -> SubFlowValueInput

@Taucher2003 Taucher2003 dismissed nicosammito’s stale review May 25, 2026 19:30

Requested rename has been done

@Taucher2003 Taucher2003 merged commit 2b34b39 into main May 25, 2026
1 check passed
@Taucher2003 Taucher2003 deleted the #931-support-sub-flows branch May 25, 2026 19:30
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.

Replacing NodeFunctionIdWrapper with SubFlow

4 participants