camunda / connectors

Camunda Connectors
https://docs.camunda.io/docs/components/integration-framework/connectors/out-of-the-box-connectors/available-connectors-overview/
Apache License 2.0
40 stars 38 forks source link

Duplicate connector templates contained in bundle #1645

Open nikku opened 8 months ago

nikku commented 8 months ago

Describe the Bug

I'm using the connectors bundle distribution attached to the latest v8.4.1 connectors release and it seems to contain duplicate templates.

I make the templates available in my project using the local discovery mechanism:

MyProject
├── .camunda
│   └── element-templates
│       ├── asana-connector-2.json
│       ├── automation-anywhere-outbound-connector-1.json
│       ├── aws-dynamodb-connector-6.json
│       ├── ...
│       ├── webhook-connector-boundary-2.json
│       ├── webhook-connector-intermediate-5.json
│       ├── webhook-connector-start-event-8.json
│       ├── webhook-connector-start-message-2.json
│       └── whatsapp-connector-2.json
├── Foo.bpmn
├── form_1.form
├── Other.bpmn
├── single_option_example.bpmn
└── Test.bpmn

Now the modeler reports a multitude of warnings:

[~/MyProject/Other.bpmn] template(id: <io.camunda.connectors.HttpJson.v2>, name: <REST Outbound Connector>): template id <io.camunda.connectors.HttpJson.v2> and version <5> already used [ warning ]
[~/MyProject/Other.bpmn] template(id: <io.camunda.connectors.http.Polling>, name: <HTTP Polling Boundary Catch Event Connector>): template id <io.camunda.connectors.http.Polling> and version <1> already used [ warning ]
[~/MyProject/Other.bpmn] template(id: <io.camunda.connectors.inbound.KAFKA.v1>, name: <Kafka Start Event Connector>): template id <io.camunda.connectors.inbound.KAFKA.v1> and version <2> already used [ warning ]

It is impossible for me as a user to make sense of why these duplicates exists and/or how to fix the issue.

Steps to Reproduce

  1. Import templates to modeler
  2. See that the warnings pop up as the modeler discovers duplicates

Expected Behavior

The core bundle ships without duplicates, and still allows me to use all connectors shipped with the run-time in the respective runtime version.

Environment

nikku commented 8 months ago

I'm not sure how the web modeler is resolving this issue. But essentially this means that one of the templates with a given ID and version cannot be used (id + version is our unique key).

sbuettner commented 8 months ago

@nikku Thanks for the feedback.

Looks like some connectors like the polling connector are re-using the same template id: io.camunda.connectors.http.Polling for different element-types.

This is also important feedback for our template generation as we will need to add some kind of discriminator for every supported bpmn type to the template id. cc @chillleader

Lets discuss this issue in our next grooming.

ev-codes commented 8 months ago

Summary from Grooming meeting:

sbuettner commented 8 months ago

@nikku Does the Desktop Modeler consider the version as part of the uniqueness check? Asking as this would be required to support template updates where multiple versions of the same id are present.

sbuettner commented 8 months ago

Discussed with @nikku in the grooming. We should use separate IDs for all our element-templates.

Oleksiivanov commented 4 months ago

fixed; related task here :

philippfromme commented 3 months ago

Re-opening as this is still an issue in the latest (8.5.3) bundle. The following IDs and versions are duplicated:

sbuettner commented 3 months ago

@philippfromme Can you point to the duplicates? I looked at the zip and I just found the element templates and the hybrid ones from the zipfile.

philippfromme commented 3 months ago

The four that I mentioned are duplicated. In Web Modeler the IDs seem to be different for some reason:

image

For example, the polling connectors have different IDs:

I'd expect the connector templates found in Web Modeler to be the same found in the bundle.

sbuettner commented 3 months ago

@philippfromme The one in the screenshot is ...Polling and ...Polling.Boundary. They are different.

sbuettner commented 3 months ago

Can you point me to the templates where you see duplicate element templates in the Connectors repository?

philippfromme commented 3 months ago

The screenshot is from web modeler. I don't know what the current pipeline of camunda/connectors to camunda/web-modeler looks like but when downloading the bundle from the releases page of the connectors repo the IDs are duplicated.