Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setHeaders processor is broken #727

Closed
lordrip opened this issue Jan 25, 2024 · 0 comments · Fixed by #728
Closed

setHeaders processor is broken #727

lordrip opened this issue Jan 25, 2024 · 0 comments · Fixed by #728
Labels
bug Something isn't working canvas/config-form Configuration form related issues
Milestone

Comments

@lordrip
Copy link
Member

lordrip commented Jan 25, 2024

Describe the Bug

After merging #726, the setHeaders processor is broken due to the change in the AutoForm mechanism.

Steps to Reproduce the Bug or Issue

  1. Add a setHeaders processor
  2. Edit a header
  3. Notice how the structure is not correct
        - setHeaders:
            id: setHeaders-2000
            description: hola
            headers:
              - null
            headers.0:
              expression:
                simple:
                  expression: myExpression
              name: myName
            headers.0.name: myName

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 0.30.0]
@lordrip lordrip added the bug Something isn't working label Jan 25, 2024
@lordrip lordrip added the canvas/config-form Configuration form related issues label Jan 25, 2024
@lordrip lordrip moved this from New to In Review in Kanban Board Jan 25, 2024
lordrip added a commit to lordrip/kaoto that referenced this issue Jan 25, 2024
After changing the way how `AutoForm` updates the node's models, nested
schemas, like the one used by `setHeader` no longer work as the key of
the property being changed is expressed using the `.` (dot) notation.

As an example: `headers.0.expression`

This means that we can't use the `key` as it is to set the values, as it
won't achieve the expected result.

The fix is to use `lodash/set` to navigate through the path and assign
the value in the right place.

fix: KaotoIO#727
@lhein lhein added this to the 2.0.0 TP1 milestone Jan 25, 2024
lordrip added a commit that referenced this issue Jan 25, 2024
After changing the way how `AutoForm` updates the node's models, nested
schemas, like the one used by `setHeader` no longer work as the key of
the property being changed is expressed using the `.` (dot) notation.

As an example: `headers.0.expression`

This means that we can't use the `key` as it is to set the values, as it
won't achieve the expected result.

The fix is to use `lodash/set` to navigate through the path and assign
the value in the right place.

fix: #727
@github-project-automation github-project-automation bot moved this from In Review to Done in Kanban Board Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working canvas/config-form Configuration form related issues
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants