Skip to content

Commit

Permalink
Merge pull request #88 from icgc-argo/RC/2.1.0
Browse files Browse the repository at this point in the history
Release 2.1.0
  • Loading branch information
lepsalex authored Jul 2, 2020
2 parents fdf435d + c9dbbc7 commit 2b5c8ab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>org.icgc.argo</groupId>
<artifactId>workflow-management</artifactId>
<version>2.0.0</version>
<version>2.1.0</version>
<name>workflow-management</name>
<description>ARGO Workflow Management</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.UUID;

@Data
@AllArgsConstructor
@NoArgsConstructor
Expand All @@ -15,7 +17,7 @@
public class WorkflowEngineParams {
private String defaultContainer;
private String revision;
private String resume;
private UUID resume;
private String launchDir;
private String projectDir;
private String workDir;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,12 @@ private String cancelRun(@NonNull String runId) {
try (final val client = getClient()) {
isPodRunning(runId);
val childPods =
client.pods().inNamespace(namespace).withLabel("runName", runId).list().getItems()
client
.pods()
.inNamespace(namespace)
.withLabel("runName", runId)
.list()
.getItems()
.stream()
.filter(pod -> pod.getMetadata().getName().startsWith(NEXTFLOW_PREFIX))
.collect(Collectors.toList());
Expand Down Expand Up @@ -242,34 +247,34 @@ private CmdKubeRun createCmd(@NonNull Launcher launcher, @NonNull WESRunParams p
cmdParams.put("withWebLog", webLogUrl);

// Dynamic engine properties/config
val workflowEngineOptions = params.getWorkflowEngineParams();
val workflowEngineParams = params.getWorkflowEngineParams();

// Write config file for run using required and optional arguments
// Use launchDir, projectDir and/or workDir if provided in workflow_engine_options
val config =
createNextflowConfigFile(
runName,
k8sConfig.getRunAsUser(),
workflowEngineOptions.getLaunchDir(),
workflowEngineOptions.getProjectDir(),
workflowEngineOptions.getWorkDir());
workflowEngineParams.getLaunchDir(),
workflowEngineParams.getProjectDir(),
workflowEngineParams.getWorkDir());
cmdParams.put("runConfig", List.of(config));

// Resume workflow by name/id
cmdParams.put("resume", workflowEngineOptions.getResume());
cmdParams.put("resume", workflowEngineParams.getResume().toString());

// Use revision if provided in workflow_engine_options
cmdParams.put("revision", workflowEngineOptions.getRevision());
cmdParams.put("revision", workflowEngineParams.getRevision());

// should pull latest code before running?
// does not prevent us running a specific version (revision),
// does enforce pulling of that branch/hash before running)
cmdParams.put("latest", workflowEngineOptions.getLatest(), v -> parseBoolean((String) v));
cmdParams.put("latest", workflowEngineParams.getLatest(), v -> parseBoolean((String) v));

// Process options (default docker container to run for process if not specified)
if (nonNull(workflowEngineOptions.getDefaultContainer())) {
if (nonNull(workflowEngineParams.getDefaultContainer())) {
val processOptions = new HashMap<String, String>();
processOptions.put("container", workflowEngineOptions.getDefaultContainer());
processOptions.put("container", workflowEngineParams.getDefaultContainer());
cmdParams.put("process", processOptions);
}

Expand Down

0 comments on commit 2b5c8ab

Please sign in to comment.