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

cli: fix download segfaults when outputs directive is wrong #147

Closed
tiborsimko opened this issue Nov 3, 2023 · 0 comments · Fixed by #150
Closed

cli: fix download segfaults when outputs directive is wrong #147

tiborsimko opened this issue Nov 3, 2023 · 0 comments · Fixed by #150
Assignees

Comments

@tiborsimko
Copy link
Member

Current behaviour

reana-client-go segfaults when the outputs directive is wrong.

For example, remove it:

$ cd reana-demo-helloworld
$ vim reana.yaml
$ git diff
diff --git a/reana.yaml b/reana.yaml
index 0fc4418..2d1eb36 100644
--- a/reana.yaml
+++ b/reana.yaml
@@ -18,6 +18,3 @@ workflow:
               --inputfile "${inputfile}"
               --outputfile "${outputfile}"
               --sleeptime ${sleeptime}
-outputs:
-  files:
-   - results/greetings.txt

Run such a workflow:

$ reana-dev run-example -c r-d-helloworld -w serial -b kubernetes --submit-only

Try to download all outputs:

$ rcg download -w helloworld-serial-kubernetes.3
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0xb057b6]

goroutine 1 [running]:
reanahub/reana-client-go/cmd.(*downloadOptions).run(0xc0003ae390, 0x0?, {0xc0002c3580?, 0x0?, 0x0?})
        .../reana-client-go/cmd/download.go:98 +0x76
reanahub/reana-client-go/cmd.newDownloadCmd.func1(0xc0003b0a00?, {0xc0002c3580?, 0x2?, 0x2?})
        .../reana-client-go/cmd/download.go:63 +0x31
github.com/spf13/cobra.(*Command).execute(0xc0003b0a00, {0xc0002c3560, 0x2, 0x2})
        /home/tibor/private/go/pkg/mod/github.com/spf13/[email protected]/command.go:872 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc0003a6280)
        /home/tibor/private/go/pkg/mod/github.com/spf13/[email protected]/command.go:990 +0x3bd
github.com/spf13/cobra.(*Command).Execute(0xc0000061a0?)
        /home/tibor/private/go/pkg/mod/github.com/spf13/[email protected]/command.go:918 +0x19
main.main()
        .../reana-client-go/main.go:28 +0x25

Expected behaviour

The reana-client-go should not segfault but emit an output message to the user that there is nothing to download and explain why.

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 a pull request may close this issue.

2 participants