Skip to content

fix: preserve node parameters without values (#875) - #1334

Closed
raphael-goetz wants to merge 1 commit into
mainfrom
fix/875-node-function-parameters
Closed

raphael-goetz wants to merge 1 commit into
mainfrom
fix/875-node-function-parameters

Conversation

@raphael-goetz

Copy link
Copy Markdown
Member

What

Ensure every NodeFunction persists one NodeParameter for each ordered FunctionParameterDefinition, even when the client submits no value for that parameter.

Why

Closes #875.

How

  • drive NodeParameter creation from the function's ordered parameter definitions instead of the submitted value count
  • keep omitted parameters as valid nil-valued rows linked to their definitions
  • preserve validation for surplus parameter inputs
  • cover empty parameter arrays through the GraphQL create mutation and align update expectations with definition count

Testing

  • bin/rails db:prepare
  • bundle exec rubocop (1,100 files, zero offenses)
  • bundle exec rspec (2,029 examples, zero failures)
  • bundle exec rake graphql:compile_docs (no generated diff)

@github-actions

Copy link
Copy Markdown

GitLab Pipeline Action

General information

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

Status: Passed
Duration: 6 minutes

Job summaries

rspec: [cloud]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17535473401/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2998655517/test_report
Finished in 30.52 seconds (files took 8.26 seconds to load)
2029 examples, 0 failures
Line Coverage: 93.48% (7241 / 7746)
[TEST PROF INFO] Time spent in factories: 00:14.724 (41.22% of total time)

rspec: [ee]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17535473400/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2998655517/test_report
Finished in 51.45 seconds (files took 13.39 seconds to load)
1886 examples, 0 failures
Line Coverage: 93.62% (6896 / 7366)
[TEST PROF INFO] Time spent in factories: 00:28.029 (47.11% of total time)

rspec: [ce]

Coverage report available at https://code0-tech.gitlab.io/-/development/sagittarius/-/jobs/17535473399/artifacts/tmp/coverage/index.html
Test summary available at https://gitlab.com/code0-tech/development/sagittarius/-/pipelines/2998655517/test_report
Finished in 43.96 seconds (files took 11.72 seconds to load)
1820 examples, 0 failures
Line Coverage: 93.2% (6658 / 7144)
[TEST PROF INFO] Time spent in factories: 00:22.180 (43.57% of total time)

docs:preview

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

rubocop

1100 files inspected, no offenses detected

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.

NodeFunction misses parameter

1 participant