tower-cli icon indicating copy to clipboard operation
tower-cli copied to clipboard

Retrieving run stats is not working for failed workflows

Open markpanganiban opened this issue 1 year ago • 0 comments

The following command fails when retrieving the stats of a failed run:

tw -v runs view -w wspace-id -i failed-wflow-id --stats

Output in verbose:

{"progress":{"workflowProgress":{"cpus":0,"cpuTime":0,"cpuLoad":0,"memoryRss":0,"memoryReq":0,"readBytes":0,"writeBytes":0,"volCtxSwitch":0,"invCtxSwitch":0,"cost":null,"loadTasks":0,"loadCpus":0,"loadMemory":0,"peakCpus":0,"peakTasks":0,"peakMemory":0,"executors":null,"dateCreated":"2024-04-17T12:03:05Z","lastUpdated":"2024-04-17T12:03:05Z","submitted":0,"succeeded":0,"running":0,"failed":0,"cached":0,"pending":0,"memoryEfficiency":0.0,"cpuEfficiency":0.0},"processesProgress":[]}}

java.lang.NullPointerException
        at io.seqera.tower.cli.commands.runs.ViewCmd.exec(ViewCmd.java:148)
        at io.seqera.tower.cli.commands.AbstractApiCmd.call(AbstractApiCmd.java:413)
        at io.seqera.tower.cli.commands.AbstractApiCmd.call(AbstractApiCmd.java:65)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at io.seqera.tower.cli.Tower.main(Tower.java:99)

Successful run:

tw -v runs view -w wspace-id -i wflow-id --stats

Output:

{"progress":{"workflowProgress":{"cpus":4,"cpuTime":38155,"cpuLoad":24773,"memoryRss":5939200,"memoryReq":0,"readBytes":219787,"writeBytes":792,"volCtxSwitch":20,"invCtxSwitch":5,"cost":0.0002445765,"loadTasks":0,"loadCpus":0,"loadMemory":0,"peakCpus":4,"peakTasks":4,"peakMemory":0,"executors":["awsbatch"],"dateCreated":"2024-04-24T18:10:53Z","lastUpdated":"2024-04-24T18:10:53Z","cached":0,"pending":0,"submitted":0,"succeeded":4,"running":0,"failed":0,"memoryEfficiency":0.0,"cpuEfficiency":64.92727},"processesProgress":[{"process":"sayHello","cpus":0,"cpuTime":0,"cpuLoad":0,"memoryRss":0,"memoryReq":0,"readBytes":0,"writeBytes":0,"volCtxSwitch":0,"invCtxSwitch":0,"loadTasks":0,"loadCpus":0,"loadMemory":0,"peakCpus":4,"peakTasks":4,"peakMemory":0,"dateCreated":"2024-04-24T18:13:52Z","lastUpdated":"2024-04-24T18:13:52Z","cached":0,"pending":0,"submitted":0,"succeeded":4,"running":0,"failed":0,"memoryEfficiency":0.0,"cpuEfficiency":0.0}]}}

markpanganiban avatar Jun 12 '24 17:06 markpanganiban