Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

[BUG] Kamelet: spec/definition/properties/remoteURI/example is removed after sync #715

Closed
igarashitm opened this issue Jun 26, 2023 · 3 comments · Fixed by #724
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@igarashitm
Copy link
Contributor

igarashitm commented Jun 26, 2023

Describe the bug
If I paste this Kamelet into source editor and click sync button

kamelet
apiVersion: camel.apache.org/v1alpha1
kind: Kamelet
metadata:
  name: jms-amqp-10-source
  annotations:
    camel.apache.org/kamelet.support.level: "Stable"
    camel.apache.org/provider: "Apache Software Foundation"
    camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
    camel.apache.org/kamelet.group: "JMS"
    camel.apache.org/kamelet.namespace: "Messaging"
  labels:
    camel.apache.org/kamelet.type: "source"
    camel.apache.org/requires.runtime: camel-k
spec:
  definition:
    title: "JMS - AMQP 1.0 Source"
    description: "Consume data from any AMQP 1.0 compliant message broker by using the Apache Qpid JMS client."
    required:
      - destinationName
      - remoteURI
    type: object
    properties:
      destinationType:
        title: "Destination Type"
        description: "The JMS destination type (queue or topic)."
        type: string
        default: queue
      destinationName:
        title: "Destination Name"
        description: "The JMS destination name."
        type: string
      remoteURI:
        title: "Broker URL"
        description: "The JMS URL."
        type: string
        example: "amqp://my-host:31616"
  dependencies:
  - "camel:jms"
  - "camel:amqp"
  - "camel:kamelet"
  template:
    beans:
      - name: connectionFactoryBean
        type: "#class:org.apache.qpid.jms.JmsConnectionFactory"
        property:
          - key: remoteURI
            value: '{{remoteURI}}'
    from:
      uri: "jms:{{destinationType}}:{{destinationName}}"
      parameters:
        connectionFactory: "#bean:{{connectionFactoryBean}}"
      steps:
      - to:
          uri: "kamelet:sink"

The backend returns empty flows it was missing - before template/property/key, non-empty response is returned once it's added.

{"flows":[],"metadata":{},"properties":{}}

To Reproduce
Steps to reproduce the behavior:

  1. Choose Kamelet in New Route dropdown box
  2. Paste the kamelet YAML
  3. Click sync button
  4. See response JSON in the browser network tab

Expected behavior
Proper integration JSON is returned

@igarashitm igarashitm added the bug Something isn't working label Jun 26, 2023
@igarashitm igarashitm added this to the 1.1.0 milestone Jun 26, 2023
@Delawen Delawen self-assigned this Jun 27, 2023
@igarashitm
Copy link
Contributor Author

The problem was in the kamelet code, - was missing right before property/key. The non-empty response is returned once it's added.

@igarashitm
Copy link
Contributor Author

Now the only issue with this is that remoteURI/example is removed after sync.

@igarashitm igarashitm changed the title [BUG] Kamelet: Empty flows is returned [BUG] Kamelet: spec/properties/remoteURI/example is removed after sync Jun 27, 2023
@igarashitm igarashitm changed the title [BUG] Kamelet: spec/properties/remoteURI/example is removed after sync [BUG] Kamelet: spec/definition/properties/remoteURI/example is removed after sync Jun 27, 2023
Delawen added a commit to Delawen/zimara-backend that referenced this issue Jun 28, 2023
Delawen added a commit to Delawen/zimara-backend that referenced this issue Jun 28, 2023
@igarashitm
Copy link
Contributor Author

Duplicate of #714

@igarashitm igarashitm marked this as a duplicate of #714 Jun 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants