Skip to content

Commit

Permalink
SDC-10311: Issue while importing pipeline with the API in latest Stre…
Browse files Browse the repository at this point in the history
…amsets Version(3.5.0)

Change-Id: I13ee3ef4330f100c345176339f5d7da3b5d16910
Reviewed-on: https://review.streamsets.net/17496
Tested-by: StreamSets CI <[email protected]>
Reviewed-by: Anthony McKeehan <[email protected]>
  • Loading branch information
jarcec committed Oct 23, 2018
1 parent 791f897 commit d9e171f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.streamsets.datacollector.restapi;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
Expand Down Expand Up @@ -1403,7 +1404,10 @@ private PipelineEnvelopeJson importPipelineEnvelope(
PipelineConfiguration newPipelineConfig;
RuleDefinitions newRuleDefinitions;

String label = name;
String label = pipelineConfig.getTitle();
if(Strings.isNullOrEmpty(label)) {
label = name;
}

if (overwrite) {
if (store.hasPipeline(name)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ public PipelineStoreTask provide() {
LOG.debug("Ignoring exception", e);
}

Mockito.when(pipelineStore.create("user1", "newFromImport", "newFromImport",null, false, false)).thenReturn(
Mockito.when(pipelineStore.create("user1", "newFromImport", "label",null, false, false)).thenReturn(
MockStages.createPipelineConfigurationSourceProcessorTarget());

} catch (com.streamsets.datacollector.util.PipelineException e) {
Expand Down

0 comments on commit d9e171f

Please sign in to comment.