Uploaded image for project: 'Talend Unified Platform'
  1. Talend Unified Platform
  2. TUP-32294

Bug in integration ActiveIfs in studio

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • Hide

      Build a connector with a config (datastore or dataset or config) with an activeifs condition with or operator and twice same target.
      Integrate on studio; connector won't be available; and try to open an existing job with this connector (from anterior version for example) will generate exception on "workspace/.metadata/.log" file.

      Show
      Build a connector with a config (datastore or dataset or config) with an activeifs condition with or operator and twice same target. Integrate on studio; connector won't be available; and try to open an existing job with this connector (from anterior version for example) will generate exception on "workspace/.metadata/.log" file.
    • Java 8
    • All
    • Small

    Description

      On Studio 7.3.1, with patch R2021-03_v1-7.3.;
      On a tck config connector, when an ActiveIfs condition contains several ActiveIf with same target (with OR Operator for example); studio integration generate an exception with stack trace :

      java.lang.IllegalStateException: Duplicate key configuration.dataSet.datastore.authentication: CLIENT_ID
      	at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
      	at java.util.HashMap.merge(HashMap.java:1254)
      	at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
      ...
      	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
      	at org.talend.sdk.component.studio.model.parameter.SettingVisitor.lambda$7(SettingVisitor.java:196)
      	at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
      	at org.talend.sdk.component.studio.model.parameter.SettingVisitor.getSettings(SettingVisitor.java:178)
      	at org.talend.sdk.component.studio.model.parameter.ElementParameterCreator.addSettings(ElementParameterCreator.java:110)
      	at org.talend.sdk.component.studio.model.parameter.ElementParameterCreator.createParameters(ElementParameterCreator.java:96)
      

      Pb seems to come from SettingVisitor class, on method getSettings();
      targetParams variables aims to regroup all target of several condition groups (to map name and target component); so, it would allow to have several time same target.
      So, it misses a ".dictinct()" call after this stream.map() call.

      Attachments

        Issue Links

          Activity

            People

              nrousseau Nicolas Rousseau
              clesaec Christophe LeSaec
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: