use of org.flyte.api.v1.PartialTaskIdentifier in project flytekit-java by flyteorg.
the class IdentifierRewriteTest method shouldNotRewriteTaskIdentifierWhenVersionIsSet.
@Test
void shouldNotRewriteTaskIdentifierWhenVersionIsSet() {
PartialTaskIdentifier rewrittenTaskId = rewriter.apply(PartialTaskIdentifier.builder().project("external-project").domain("external-domain").name("external-task").version("external-version").build());
assertThat(rewrittenTaskId, equalTo(PartialTaskIdentifier.builder().project("external-project").domain("external-domain").name("external-task").version("external-version").build()));
verifyNoInteractions(client);
}
use of org.flyte.api.v1.PartialTaskIdentifier in project flytekit-java by flyteorg.
the class SdkDynamicWorkflowTask method apply.
@Override
public SdkNode apply(SdkWorkflowBuilder builder, String nodeId, List<String> upstreamNodeIds, @Nullable SdkNodeMetadata metadata, Map<String, SdkBindingData> inputs) {
PartialTaskIdentifier taskId = PartialTaskIdentifier.builder().name(getName()).build();
List<CompilerError> errors = Compiler.validateApply(nodeId, inputs, getInputType().getVariableMap());
if (!errors.isEmpty()) {
throw new CompilerException(errors);
}
return new SdkTaskNode(builder, nodeId, taskId, upstreamNodeIds, metadata, inputs, outputType.getVariableMap());
}
use of org.flyte.api.v1.PartialTaskIdentifier in project flytekit-java by flyteorg.
the class SdkRunnableTask method apply.
@Override
public SdkNode apply(SdkWorkflowBuilder builder, String nodeId, List<String> upstreamNodeIds, @Nullable SdkNodeMetadata metadata, Map<String, SdkBindingData> inputs) {
PartialTaskIdentifier taskId = PartialTaskIdentifier.builder().name(getName()).build();
List<CompilerError> errors = Compiler.validateApply(nodeId, inputs, getInputType().getVariableMap());
if (!errors.isEmpty()) {
throw new CompilerException(errors);
}
return new SdkTaskNode(builder, nodeId, taskId, upstreamNodeIds, metadata, inputs, outputType.getVariableMap());
}
Aggregations