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

fixes npe issue with --stats #459

Merged
merged 3 commits into from
Oct 1, 2024
Merged

fixes npe issue with --stats #459

merged 3 commits into from
Oct 1, 2024

Conversation

munishchouhan
Copy link
Member

This PR will fix the issue of getting NPE when using --stats for failed or cancelled pipelines

error:

tw % ./tw runs view -i 35vHNSjgrDPftA -w "community/showcase" --stats           
java.lang.NullPointerException
        at io.seqera.tower.cli.commands.runs.ViewCmd.exec(ViewCmd.java:147)
        at io.seqera.tower.cli.commands.AbstractApiCmd.call(AbstractApiCmd.java:436)
        at io.seqera.tower.cli.commands.AbstractApiCmd.call(AbstractApiCmd.java:67)
        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:101)
        at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)

@munishchouhan
Copy link
Member Author

tested after the fix:

tower-cli % ./tw runs view -i 35vHNSjgrDPftA -w "community/showcase" --stats
Running in Zsh
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

  Run at [community / showcase] workspace:


    General
    ---------------------+---------------------------------------------
     ID                  | 35vHNSjgrDPftA                              
     Operation ID        | cee67d72-90b4-4eae-b87c-5b51e33c3f9d        
     Run name            | hungry_church                               
     Status              | CANCELLED                                   
     Starting date       | No date reported                            
     Commit ID           | No commit ID reported                       
     Session ID          | e096d322-9386-4b9a-9adf-bfdf9cb8f54c        
     Username            | marvin-umali                                
     Workdir             | s3://nf-tower-bucket/scratch/35vHNSjgrDPftA 
     Container           | No container was reported                   
     Executors           | No executors were reported                  
     Compute Environment | AWS_Batch_Ireland_FusionV2_NVMe             
     Nextflow Version    | No Nextflow version reported                
     Labels              | owner=seqera,rnaseq,workspace=showcase      

    Stats
    ----------------+------------
     Wall Time      | nu minutes 
     CPU Time       | 0.00 hours 
     Total Memory   | 0.00 GB    
     Read           | 0.00 GB    
     Write          | 0.00 GB    
     Estimated Cost | $nu        

@munishchouhan munishchouhan self-assigned this Sep 30, 2024
@munishchouhan
Copy link
Member Author

@jordeu and @JaimeSeqLabs its a very small change, please review

@munishchouhan munishchouhan merged commit 3f53419 into master Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants