Skip to content

Commit 116814a

Browse files
authored
Add ability to fetch lp with version (#209)
1 parent 2aaab0b commit 116814a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

flytekit-java/src/main/java/org/flyte/flytekit/SdkRemoteLaunchPlan.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public SdkType<OutputT> getOutputType() {
6868

6969
/**
7070
* Create a remote launch plan, a reference to a launch plan that have been deployed previously.
71+
* This function will fetch the latest version of the launch plan
7172
*
7273
* @param domain the domain of the remote launch plan
7374
* @param project the project of the remote launch plan
@@ -82,10 +83,32 @@ public static <InputT, OutputT> SdkRemoteLaunchPlan<InputT, OutputT> create(
8283
String name,
8384
SdkType<InputT> inputs,
8485
SdkType<OutputT> outputs) {
86+
return create(domain, project, name, null, inputs, outputs);
87+
}
88+
89+
/**
90+
* Create a remote launch plan, a reference to a launch plan that have been deployed previously.
91+
*
92+
* @param domain the domain of the remote launch plan
93+
* @param project the project of the remote launch plan
94+
* @param name the name of the remote launch plan
95+
* @param version of the remote launch plan, defaults to the latest version if null
96+
* @param inputs the {@link SdkType} for the inputs of the remote launch plan
97+
* @param outputs the {@link SdkType} for the outputs of the remote launch plan
98+
* @return the remote launch plan
99+
*/
100+
public static <InputT, OutputT> SdkRemoteLaunchPlan<InputT, OutputT> create(
101+
String domain,
102+
String project,
103+
String name,
104+
@Nullable String version,
105+
SdkType<InputT> inputs,
106+
SdkType<OutputT> outputs) {
85107
return SdkRemoteLaunchPlan.<InputT, OutputT>builder()
86108
.domain(domain)
87109
.project(project)
88110
.name(name)
111+
.version(version)
89112
.inputs(inputs)
90113
.outputs(outputs)
91114
.build();

0 commit comments

Comments
 (0)