Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

glab ci status failing (glab version 1.17.0) #727

Closed
sanjeevik89 opened this issue May 16, 2021 · 2 comments · Fixed by #730
Closed

glab ci status failing (glab version 1.17.0) #727

sanjeevik89 opened this issue May 16, 2021 · 2 comments · Fixed by #730
Labels
bug Something isn't working needs: user input More info is required about this issue or PR

Comments

@sanjeevik89
Copy link

sanjeevik89 commented May 16, 2021

Description
Getting error when running status subcommand on glab ci. Meanwhile glab ci view working as expected.
Expected Behavior vs Actual Behavior
Show status of latest pipeline with option to view logs & retry.

Logs

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xc55aaa]

goroutine 1 [running]:
github.com/profclems/glab/commands/ci/status.NewCmdStatus.func1(0xc000666280, 0x16bdda8, 0x0, 0x0, 0x0, 0x0)
        /home/runner/work/glab/glab/commands/ci/status/status.go:88 +0x49a
github.com/spf13/cobra.(*Command).execute(0xc000666280, 0x16bdda8, 0x0, 0x0, 0xc000666280, 0x16bdda8)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x453
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004e0000, 0xc0000a8008, 0xd3, 0x2)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x349
main.main()
        /home/runner/work/glab/glab/cmd/glab/main.go:140 +0x793

Your Environment
Ubuntu 20.04 running as a Docker container on Amazon Linux

  • Version used (Run glab --version): 1.17.0
  • Operating System and version: Ubuntu 20.04
@sanjeevik89 sanjeevik89 added the bug Something isn't working label May 16, 2021
@profclems
Copy link
Owner

profclems commented May 16, 2021

@sanjeevik89 thanks for opening this issue.

I can't seem to reproduce this issue. Is the pipeline a detached pipeline? If yes, then it must be related to this issue #721

@profclems profclems added the needs: user input More info is required about this issue or PR label May 16, 2021
@tommyknows
Copy link
Contributor

tommyknows commented May 16, 2021

I can reproduce this, will have a look together with #721.

Edit: Actually, it's not really related to #721 - the issue appears if a job requires a manual trigger and has not started yet. I'll send a separate PR for that.

tommyknows pushed a commit to tommyknows/glab that referenced this issue May 16, 2021
This commit fixes a bug where a `glab ci status` would panic if there is
a job within that CI pipeline that is not triggered yet. In such a case,
the StartedAt field is not populated, which triggered a panic.

To fix this, we use `time.Now()` if `StartedAt` is nil, which means that
the job will be displayed with a duration of 0.

Fixes profclems#727
profclems pushed a commit to olearycrew/glab that referenced this issue Jun 12, 2021
This commit fixes a bug where a `glab ci status` would panic if there is
a job within that CI pipeline that is not triggered yet. In such a case,
the StartedAt field is not populated, which triggered a panic.

To fix this, we use `time.Now()` if `StartedAt` is nil, which means that
the job will be displayed with a duration of 0.

Fixes profclems#727
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working needs: user input More info is required about this issue or PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants