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

[BUG] Panic during odin log #44

Open
tmkontra opened this issue Aug 2, 2020 · 3 comments
Open

[BUG] Panic during odin log #44

tmkontra opened this issue Aug 2, 2020 · 3 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tmkontra
Copy link
Contributor

tmkontra commented Aug 2, 2020

Describe the bug
Deploying a new job, then pulling logs via the CLI results in a panic (SIGSEGV).

To Reproduce

  1. odin deploy -f test.job.yaml
  2. odin log -i {job_id}
vagrant@vagrant:~/odin$ odin log -i dea194794589
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0x79c764]

goroutine 1 [running]:
github.com/theycallmemac/odin/odin-cli/pkg/commands.logJob(0x7ffda66ec793, 0xc, 0x868da6, 0x5)
        /home/vagrant/odin/odin-cli/pkg/commands/log.go:53 +0x154
github.com/theycallmemac/odin/odin-cli/pkg/commands.glob..func7(0xbb6c80, 0xc00000e720, 0x0, 0x2)
        /home/vagrant/odin/odin-cli/pkg/commands/log.go:25 +0xda
github.com/spf13/cobra.(*Command).execute(0xbb6c80, 0xc00000e6e0, 0x2, 0x2, 0xbb6c80, 0xc00000e6e0)
        /home/vagrant/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:844 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0xbb79a0, 0x443a8a, 0xb7f4c0, 0xc000000180)
        /home/vagrant/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
        /home/vagrant/go/pkg/mod/github.com/spf13/cobra@v0.0.6/command.go:885
github.com/theycallmemac/odin/odin-cli/pkg/commands.Execute()
        /home/vagrant/odin/odin-cli/pkg/commands/root.go:33 +0x31
main.main()
        /home/vagrant/odin/odin-cli/cmd/odin/odin.go:6 +0x20

Expected behavior
I believe just no output, until the job runs the first time.

Screenshots
n/a

Desktop (please complete the following information):

  • OS: Ubuntu 18 LTS (vagrant on macOS)
@theycallmemac
Copy link
Owner

Yes it looks like a panic is generated until a job is finally run. This should be an easy enough fix. I think the CLI is quite prone to panics like this so a sweep of the tool might be in order.

@theycallmemac theycallmemac added bug Something isn't working good first issue Good for newcomers labels Aug 2, 2020
@theycallmemac
Copy link
Owner

@ttymck strangely enough I'm unable to duplicate this issue. When I run odin log -i {job-id}, a panic is not generated.

Can you confirm you are using the v1.0.0 release and not the code in the master branch?

@benji2512
Copy link

@theycallmemac I am getting the same error as above on Ubuntu 20.04 on a DigitalOcean droplet. I can confirm that I am using tagged v1.0.0 release
git checkout tags/v1.0.0 Note: switching to 'tags/v1.0.0'.
HEAD is now at 081323d as per last commit on that tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants