You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/07/03 10:08:32 UTC

[GitHub] [camel-k] nicolaferraro opened a new issue #1590: Restore flow type as object?

nicolaferraro opened a new issue #1590:
URL: https://github.com/apache/camel-k/issues/1590


   I've seen now this commit @astefanutti : https://github.com/apache/camel-k/commit/1b95c5a2b19c8566860fff0b2b736a0b8b8470a3
   
   The flow type was "special" meaning that it allowed to create an integration like:
   
   ```
   kind: Integration
   apiVersion: camel.apache.org/v1
   spec:
     flows:
     - from:
         uri: timer
         steps:
         - log:
           message: Hello
   ```
   
   While, setting it as string the integration becomes "probably" like:
   
   ```
   kind: Integration
   apiVersion: camel.apache.org/v1
   spec:
     flows:
     - |-
       from:
         uri: timer
         steps:
         - log:
           message: Hello
   ```
   
   I don't think we have e2e tests (but we should add them). In terms of JSONSchema, it was an array of objects, now it's an array of strings.
   
   The reason why this was important is because the Integration object was a unique YAML (also convertible to json) and when @lburgazzoli completes the YAML schema for validation, also the integration object can have autocompletion/verification by tooling.. And that is also more important for Kamelets..
   
   
   Does the conversion to string affect everything as I've described @astefanutti ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti commented on issue #1590: Restore flow type as object?

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #1590:
URL: https://github.com/apache/camel-k/issues/1590#issuecomment-653479899


   Sorry, I failed to proactively warn you about this, but knew it would soon come back to haunt me :)
   
   The previous `type Flow map[string]interface{}` was getting into the way of enabling CRD generation, and also leads to the question of schema validation.
   
   I initially used `type Flow json.RawMessage` in 45bc5e9dd0b3386ed999d58ce58b555c8cc834bd, and I fail to remember why I ultimately decided to go for `type Flow string`. I think it was just more convenient to use, without more context. While it worked, you're right it's not transparent from a schema standpoint.
   
   I think using `json.RawMessage` or `runtime.RawExtension` should be less disruptive and enable to get back to what we had before.
   
   More context can be found in https://github.com/kubernetes-sigs/controller-tools/issues/294.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] nicolaferraro closed issue #1590: Restore flow type as object?

Posted by GitBox <gi...@apache.org>.
nicolaferraro closed issue #1590:
URL: https://github.com/apache/camel-k/issues/1590


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org