theapsgroup / steampipe-plugin-gitlab

Use SQL to instantly query GitLab projects, groups and more. Open source CLI. No DB required.
https://hub.steampipe.io/plugins/theapsgroup/gitlab
Apache License 2.0
20 stars 8 forks source link

panic error on install #12

Closed bdmorin closed 2 years ago

bdmorin commented 2 years ago

not sure what diagnostic information to offer.

10:50:48 ❯ steampipe plugin install theapsgroup/gitlab                                                                       

panic: runtime error: index out of range [-1]

goroutine 14 [running]:
github.com/turbot/steampipe/cmd.doPluginInstall.func2(0xc000796ea0?)
    /home/runner/work/steampipe/steampipe/cmd/plugin.go:270 +0xb1
github.com/gosuri/uiprogress.(*Bar).Bytes(0xc00058c200)
    /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/bar.go:200 +0x288
github.com/gosuri/uiprogress.(*Bar).String(...)
    /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/bar.go:214
github.com/gosuri/uiprogress.(*Progress).print(0xc00070c8a0)
    /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:127 +0x96
github.com/gosuri/uiprogress.(*Progress).Listen(0xc00070c8a0)
    /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:114 +0x29
created by github.com/gosuri/uiprogress.(*Progress).Start
    /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:134 +0x56
~
10:50:49 ❯ steampipe -v                                                                                                     
steampipe version 0.14.4

❯ uname -a  
Darwin dredl0ck 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64 x86_64

❯ go version                                    
go version go1.18.2 darwin/amd64

No real experience with steampipe yet, so perhaps my setup isn't correct.

Bonemind commented 2 years ago

Not a maintainer, but still like to follow along with what APS does :)

Anyway, this is an odd one, ran into this one just now when trying to install the plugin:


panic: runtime error: index out of range [-1]

goroutine 14 [running]:
github.com/turbot/steampipe/cmd.doPluginInstall.func2(0xc000010ea0?)
        /home/runner/work/steampipe/steampipe/cmd/plugin.go:270 +0xb1
github.com/gosuri/uiprogress.(*Bar).Bytes(0xc00037ec80)
        /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/bar.go:200 +0x288
github.com/gosuri/uiprogress.(*Bar).String(...)
        /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/bar.go:214
github.com/gosuri/uiprogress.(*Progress).print(0xc0000aa5a0)
        /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:127 +0x96
github.com/gosuri/uiprogress.(*Progress).Listen(0xc0000aa5a0)
        /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:114 +0x29
created by github.com/gosuri/uiprogress.(*Progress).Start
        /home/runner/go/pkg/mod/github.com/gosuri/uiprogress@v0.0.1/progress.go:134 +0x56

On linux, v0.14.4, however, when I tried to install a different plugin: theapsgroup/vault and then the gitlab one it worked.

Tried with a fresh steampipe install, it also worked.

Either something is slightly off with this steampipe plugin's manifest or something, which is fixed by installing another plugin, OR there was a hiccup on the steampipe hub. My money is on the latter, but if you're still having the issue i'd be interested to know whether installing another plugin and then this one works for you.

bdmorin commented 2 years ago

i'd be interested to know whether installing another plugin and then this one works for you

Yes. I've setup github, and csv. Seem to work fine. I don't know go, but I'm going to see if it's something local to my workstation.

bdmorin commented 2 years ago

ok.. well, I'm not sure what I did, but it installed after trying it a few times.


❯ steampipe plugin install theapsgroup/gitlab                                                           

theapsgroup/gitlab   [====================================================================] Already installed

To update plugin which is already installed, please run steampipe plugin update theapsgroup/gitlab
graza-io commented 2 years ago

Hi @bdmorin I've just attempted to install this plugin to a fresh Steampipe install and it worked successfully, I would imagine it's a temporary hiccup with the hub - trying again may fix the issue.


❯ cat Dockerfile
FROM turbot/steampipe:0.14.4
USER steampipe:0
RUN steampipe plugin install theapsgroup/gitlab
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["service", "start", "--foreground"]

❯ docker build -t steampipe-test .
[+] Building 22.8s (7/7) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                      0.0s
 => => transferring dockerfile: 217B                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/turbot/steampipe:0.14.4                                                                                                                                        3.6s
 => [auth] turbot/steampipe:pull token for registry-1.docker.io                                                                                                                                           0.0s
 => [1/2] FROM docker.io/turbot/steampipe:0.14.4@sha256:893b3c1509e4035b76fc49c3577b0567ec2d5dcbefc26974676ae8b9fd6b9bea                                                                                 14.4s
 => => resolve docker.io/turbot/steampipe:0.14.4@sha256:893b3c1509e4035b76fc49c3577b0567ec2d5dcbefc26974676ae8b9fd6b9bea                                                                                  0.0s
 => => sha256:893b3c1509e4035b76fc49c3577b0567ec2d5dcbefc26974676ae8b9fd6b9bea 2.20kB / 2.20kB                                                                                                            0.0s
 => => sha256:c32ce6654453d35d0b3dde45d195adeee586ffba0a683006ee06748c077c01fa 27.14MB / 27.14MB                                                                                                          5.8s
 => => sha256:a48d2bd817b308b6a8835fbff62f41e70a6e9657be2dc476f54cb22429569e86 17.10MB / 17.10MB                                                                                                          7.2s
 => => sha256:bd2b4051a3b0ce4cc41c9a2d348907dfe3bfd770a4333b8ca287d19e1dabcee4 4.96kB / 4.96kB                                                                                                            0.0s
 => => sha256:cc9cb668cd0eafb9362ccda696caf5945d4316d4a364b4abe78dee052efbc57e 3.93kB / 3.93kB                                                                                                            0.5s
 => => sha256:be45aa42b4d350cdb36bfdd6ba32e470ec9d6e147aa81066e20d98c3d53e1931 12.54MB / 12.54MB                                                                                                          8.2s
 => => extracting sha256:c32ce6654453d35d0b3dde45d195adeee586ffba0a683006ee06748c077c01fa                                                                                                                 1.3s
 => => sha256:4d4c4f733bb0c4d7c84258f6c626e479d61dc9145c0db44f480e237dee421842 108B / 108B                                                                                                                6.1s
 => => sha256:bf01c00a332643f65b77dd10a0b78f8b14fcb550002504fd69460ba873b85e55 45.11MB / 45.11MB                                                                                                         12.2s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                                                                  7.3s
 => => extracting sha256:cc9cb668cd0eafb9362ccda696caf5945d4316d4a364b4abe78dee052efbc57e                                                                                                                 0.0s
 => => extracting sha256:a48d2bd817b308b6a8835fbff62f41e70a6e9657be2dc476f54cb22429569e86                                                                                                                 0.5s
 => => sha256:7f26cb3ad3608276fc6bb8003adf77490631fc242dde10056c066daabbbfb0f5 206B / 206B                                                                                                                7.7s
 => => sha256:415b2327cec6d158b0c294d19e532ea8dba30dd25923da975d2228360dc64366 393B / 393B                                                                                                                8.0s
 => => extracting sha256:be45aa42b4d350cdb36bfdd6ba32e470ec9d6e147aa81066e20d98c3d53e1931                                                                                                                 0.4s
 => => extracting sha256:4d4c4f733bb0c4d7c84258f6c626e479d61dc9145c0db44f480e237dee421842                                                                                                                 0.0s
 => => extracting sha256:bf01c00a332643f65b77dd10a0b78f8b14fcb550002504fd69460ba873b85e55                                                                                                                 1.9s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                                                                 0.0s
 => => extracting sha256:7f26cb3ad3608276fc6bb8003adf77490631fc242dde10056c066daabbbfb0f5                                                                                                                 0.0s
 => => extracting sha256:415b2327cec6d158b0c294d19e532ea8dba30dd25923da975d2228360dc64366                                                                                                                 0.0s
 => [2/2] RUN steampipe plugin install theapsgroup/gitlab                                                                                                                                                 4.5s
 => exporting to image                                                                                                                                                                                    0.1s
 => => exporting layers                                                                                                                                                                                   0.1s
 => => writing image sha256:dcb48c3b9533ac87846d59affa885150d451d57a470d5774b78c58594575b1cd                                                                                                              0.0s
 => => naming to docker.io/library/steampipe-test                                                                                                                                                         0.0s

Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them```
graza-io commented 2 years ago

@Bonemind thanks for looking into it <3

e-gineer commented 2 years ago

Thanks for investigating @Bonemind and @graza-io.

Appreciate your raising this issue @bdmorin ... we should never crash even if a related process failed ... sorry about that first impression!

Leaving this open so we can investigate the cause of the crash.

e-gineer commented 2 years ago

Actually, sorry, this should be an issue on turbot/steampipe instead. So we can close here, and I'll open one there to track.

graza-io commented 2 years ago

Closing as issue registered on https://github.com/turbot/steampipe/issues/2086