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

aqua g: unknown packages raises panic #1388

Closed
suzuki-shunsuke opened this issue Nov 9, 2022 · 0 comments · Fixed by #1389
Closed

aqua g: unknown packages raises panic #1388

suzuki-shunsuke opened this issue Nov 9, 2022 · 0 comments · Fixed by #1389
Labels
bug Something isn't working
Milestone

Comments

@suzuki-shunsuke
Copy link
Member

aqua version

Please use the latest version.

$ aqua -v
aqua version 1.23.0 (e2883a00e65f941aa105740da86039d39d7601b4)

Environment

  • OS (Windows, Linux, macOS, etc): darwin
  • CPU Architecture (amd64, arm64, etc): arm64

Overview

How to reproduce

  • aqua.yaml
  • executed command and output

aqua.yaml should be not partial but complete configuration.
Please remove unneeded configuration to reproduce the issue.

aqua.yaml

registries:
- type: standard
  ref: v3.91.0
packages:
$ aqua g foo
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x102b7ea5c]

goroutine 1 [running]:
github.com/aquaproj/aqua/pkg/controller/generate.(*Controller).listPkgsWithoutFinder(0x140003243c0?, {0x102e68ba0, 0x1400011d380}, 0x140003243f0?, 0x1400033a000, 0x3a?, {0x14000301050, 0x1, 0x102bb3a01?})
	/home/runner/work/aqua/aqua/pkg/controller/generate/generate.go:195 +0x1fc
github.com/aquaproj/aqua/pkg/controller/generate.(*Controller).listPkgs(0x1400033e120, {0x102e68ba0, 0x1400011d380}, 0x0?, 0x1400033a000, 0x14000300fb0?, {0x1400031a080?, 0x1?}, {0x14000301050, 0x1, ...})
	/home/runner/work/aqua/aqua/pkg/controller/generate/generate.go:121 +0xa8
github.com/aquaproj/aqua/pkg/controller/generate.(*Controller).Generate(0x1400033e120, {0x102e68ba0, 0x1400011d380}, 0x1033b02a0?, 0x1400033a000, {0x14000301050, 0x1, 0x1})
	/home/runner/work/aqua/aqua/pkg/controller/generate/generate.go:91 +0x104
github.com/aquaproj/aqua/pkg/cli.(*Runner).generateAction(0x14000108b90, 0x140003163c0)
	/home/runner/work/aqua/aqua/pkg/cli/generate.go:151 +0x1dc
github.com/urfave/cli/v2.(*Command).Run(0x140003103c0, 0x140003163c0, {0x14000318760, 0x2, 0x2})
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.23.5/command.go:271 +0x804
github.com/urfave/cli/v2.(*Command).Run(0x140003112c0, 0x14000316140, {0x14000110090, 0x3, 0x3})
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.23.5/command.go:264 +0xa24
github.com/urfave/cli/v2.(*App).RunContext(0x1400030c000, {0x102e68ba0?, 0x1400011d380}, {0x14000110090, 0x3, 0x3})
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.23.5/app.go:329 +0x5dc
github.com/aquaproj/aqua/pkg/cli.(*Runner).Run(0x14000108b90, {0x102e68ba0, 0x1400011d380}, {0x14000110090, 0x3, 0x3})
	/home/runner/work/aqua/aqua/pkg/cli/runner.go:134 +0x1d78
main.core(0x14000245420, 0x14000141140)
	/home/runner/work/aqua/aqua/cmd/aqua/main.go:56 +0x26c
main.main()
	/home/runner/work/aqua/aqua/cmd/aqua/main.go:30 +0x54

Debug Output

Please set the environment variable AQUA_LOG_LEVEL=debug and run aqua and tell us the debug output.

$ 

Expected Behaviour

aqua exits with the status code non zero.

$ aqua g foo
ERR package isn't found

$ echo $?
1

Actual Behaviour

A panic occurs.

Important Factoids

References

@suzuki-shunsuke suzuki-shunsuke added the bug Something isn't working label Nov 9, 2022
suzuki-shunsuke added a commit that referenced this issue Nov 9, 2022
@suzuki-shunsuke suzuki-shunsuke added this to the v1.23.1 milestone Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant