[ BUG ] panic: runtime error: index out of range [1] with length 1
- Dominant language
- Go
- Stars
- 783
- Forks
- 126
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 11
Description
I have a CircleCi pipeline that triggers on commit to the main branch. CR is ran using docker with the latest tag:
```yaml
version: 2
jobs:
package-upload-index:
docker:
- image: quay.io/helmpack/chart-releaser
steps:
- checkout
- run:
name: package
command: |
charts=$(find . -maxdepth 1 -type d \( ! -name .git ! -name .deploy ! -name .circleci ! -name . \) -print)
for chart in $charts
do
cr package $chart
done
- run:
name: upload
command: cr upload -o soblivionscall -r charts
- run:
name: index
command: |
apk add git
cr index -i ./index.yaml -o soblivionscall -c https://soblivionscall.github.io/charts/ -r charts --push
workflows:
version: 2
release:
jobs:
- package-upload-index:
filters:
tags:
ignore: /.*/
branches:
only: main
```
On the index step i am seeing:
```bash
#!/bin/sh -eo pipefail
apk add git
cr index -i ./index.yaml -o soblivionscall -c https://soblivionscall.github.io/charts/ -r charts --push
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
0% OK: 19 MiB in 21 packages
Using existing index at ./index.yaml
Found speedtest-tracker-3.0.0.tgz
Extracting chart metadata from .cr-release-packages/speedtest-tracker-3.0.0.tgz
Calculating Hash for .cr-release-packages/speedtest-tracker-3.0.0.tgz
Updating index ./index.yaml
Preparing worktree (detached HEAD dcc0111)
HEAD is now at dcc0111 Update index.yaml
[detached HEAD 18158f7] Update index.yaml
Author: root <***********************>
1 file changed, 11 insertions(+), 1 deletion(-)
panic: runtime error: index out of range [1] with length 1
goroutine 1 [running]:
github.com/helm/chart-releaser/pkg/git.(*Git).GetPushURL(0x27634b0, 0x1a14a7f, 0x6, 0xc000046189, 0x28, 0x0, 0x0, 0x0, 0x0)
/home/runner/work/chart-releaser/chart-releaser/pkg/git/git.go:80 +0x2dd
github.com/helm/chart-releaser/pkg/releaser.(*Releaser).UpdateIndexFile(0xc000e7dd50, 0x0, 0x0, 0x0)
/home/runner/work/chart-releaser/chart-releaser/pkg/releaser/releaser.go:223 +0xf78
github.com/helm/chart-releaser/cr/cmd.glob..func1(0x27069a0, 0xc0003f5b90, 0x0, 0x9, 0x0, 0x0)
/home/runner/work/chart-releaser/chart-releaser/cr/cmd/index.go:40 +0x217
github.com/spf13/cobra.(*Command).execute(0x27069a0, 0xc0003f5b00, 0x9, 0x9, 0x27069a0, 0xc0003f5b00)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:852 +0x47c
github.com/spf13/cobra.(*Command).ExecuteC(0x2706ea0, 0x0, 0x0, 0x0)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:960 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.1.3/command.go:897
github.com/helm/chart-releaser/cr/cmd.Execute()
/home/runner/work/chart-releaser/chart-releaser/cr/cmd/root.go:35 +0x2d
main.main()
/home/runner/work/chart-releaser/chart-releaser/cr/main.go:20 +0x25
Exited with code exit status 2
CircleCI received exit code 2
```
Obviously it's an issue with an out of bounds index but i don't know what index it is referring to. This pipeline has ran flawlessly for months without any changes so i'm fairly certain it's not something i did. Can anyone provide some insight as to what might be going on?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.