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

pack builder suggest should not panic when using registry mirror #1250

Closed
aemengo opened this issue Aug 9, 2021 · 0 comments · Fixed by #1255
Closed

pack builder suggest should not panic when using registry mirror #1250

aemengo opened this issue Aug 9, 2021 · 0 comments · Fixed by #1255
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.

Comments

@aemengo
Copy link
Contributor

aemengo commented Aug 9, 2021

Summary

Running pack builder suggest with a registry mirror configured causes a golang panic errror

19:23 $ pack builder suggest

...

Using mirror <REDACTED-REGISTRY-MIRROR>/dockerhub-mirror/heroku/buildpacks:18 for heroku/buildpacks:18
Using mirror <REDACTED-REGISTRY-MIRROR>/dockerhub-mirror/paketobuildpacks/builder:base for paketobuildpacks/builder:base
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x185090c]

goroutine 18 [running]:
github.com/buildpacks/pack/internal/commands.getBuilderDescription(0x1a50ab5, 0x6, 0x1a65f26, 0x1c, 0x1a65896, 0x1c, 0x1bb0060, 0xc000382300, 0x0, 0x0)
	github.com/buildpacks/pack/internal/commands/suggest_builders.go:121 +0x9c
github.com/buildpacks/pack/internal/commands.WriteSuggestedBuilder.func2(0x1bb0060, 0xc000382300, 0xc00042a0c0, 0x6, 0x6, 0xc00041c190, 0x0, 0x1a50ab5, 0x6, 0x1a65f26, ...)
	github.com/buildpacks/pack/internal/commands/suggest_builders.go:102 +0x60
created by github.com/buildpacks/pack/internal/commands.WriteSuggestedBuilder
	github.com/buildpacks/pack/internal/commands/suggest_builders.go:101 +0x283

Reproduction

Steps
  1. Configure pack with registry mirror
  2. Run pack builder suggest
Current behavior
  • The suggested builders do not show
  • A panic error is thrown
Expected behavior
  • The suggested builders should be shown
  • A panic error should not be thrown

Environment

pack info
$ pack report
Pack:
  Version:  0.20.0+git-66a4f32.build-2668
  OS/Arch:  darwin/amd64

Default Lifecycle Version:  0.11.3

Supported Platform APIs:  0.3, 0.4, 0.5, 0.6

Config:
  default-builder-image = "[REDACTED]"
  experimental = true

  [registry-mirrors]
    "*" = "<REDACTED-REGISTRY-MIRROR>/dockerhub-mirror"
@aemengo aemengo added status/triage Issue or PR that requires contributor attention. type/bug Issue that reports an unexpected behaviour. labels Aug 9, 2021
@jromero jromero added good first issue A good first issue to get started with. status/ready Issue ready to be worked on. and removed status/triage Issue or PR that requires contributor attention. labels Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A good first issue to get started with. status/ready Issue ready to be worked on. type/bug Issue that reports an unexpected behaviour.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants