Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove fusion retrieval to circumvent failures with nested config imports #56

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions modules/local/seqera_runs_dump/functions.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2;transitive=false')
import wslite.rest.RESTClient
import groovy.json.JsonSlurper
import nextflow.exception.ProcessException

// Set system properties for custom Java trustStore
Expand Down Expand Up @@ -31,6 +30,7 @@ Long getWorkspaceId(orgName, workspaceName, client, authHeader) {
}

Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword) {

def runId = meta.id
def (orgName, workspaceName) = meta.workspace.tokenize("/")

Expand All @@ -47,11 +47,9 @@ Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword)
def workspaceId = getWorkspaceId(orgName, workspaceName, client, authHeader)
if (workspaceId) {
def workflowResponse = client.get(path: "/workflow/${runId}", query: ["workspaceId":workspaceId], headers: authHeader)

if (workflowResponse.statusCode == 200) {
def metaMap = workflowResponse?.json?.workflow?.subMap("runName", "workDir", "projectName")
def config = new ConfigSlurper().parse( workflowResponse?.json?.workflow?.configText )
metaMap.fusion = config.fusion.enabled

return metaMap ?: [:]
}
}
Expand All @@ -69,7 +67,6 @@ Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword)
""".stripIndent()
log.error "Exception: ${ex.message}", ex
throw new ProcessException("Failed to get workflow details for workflow ${runId} in workspace ${meta.workspace}", ex)

}
return [:]
}
3 changes: 2 additions & 1 deletion modules/local/seqera_runs_dump/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ process SEQERA_RUNS_DUMP {
def args2 = task.ext.args2 ?: ''
prefix = task.ext.prefix ?: "${meta.id}"
metaOut = meta + getRunMetadata(meta, log, api_endpoint, java_truststore_path, java_truststore_password)
fusion = metaOut.fusion ? '--add-fusion-logs' : ''
fusion = '' //metaOut.fusion ? '--add-fusion-logs' : '' see issue: https://github.com/seqeralabs/nf-aggregate/issues/55
javaTrustStore = java_truststore_path ? "-Djavax.net.ssl.trustStore=${java_truststore_path}" : ''
javaTrustStorePassword = java_truststore_password ? "-Djavax.net.ssl.trustStorePassword=${java_truststore_password}" : ''

"""
tw \\
$args \\
Expand Down
10 changes: 6 additions & 4 deletions workflows/nf_aggregate/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,12 @@ workflow NF_AGGREGATE {
SEQERA_RUNS_DUMP
.out
.run_dump
.filter {
meta, run_dir ->
meta.fusion && !params.skip_run_gantt
}
// This field is currently not set, see issue: https://github.com/seqeralabs/nf-aggregate/issues/55
// .filter {
// meta, run_dir ->

// meta.fusion && !params.skip_run_gantt
// }
.set { ch_runs_for_gantt }

PLOT_RUN_GANTT (
Expand Down
Loading