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

Prevent panic nil map #2928

Merged
merged 1 commit into from Jun 29, 2022
Merged

Prevent panic nil map #2928

merged 1 commit into from Jun 29, 2022

Conversation

emosbaugh
Copy link
Member

@emosbaugh emosbaugh commented Jun 29, 2022

What this PR does / why we need it:

Fixed an issue where KOTS would crash if a Helm Chart is included with optional values and no values.

Starting Admin Console API on port 3000...

  • Listing releases

  • Pulling upstream
  • Creating base
panic: assignment to entry in nil map

goroutine 10595 [running]:
github.com/replicatedhq/kots/pkg/base.renderReplicatedHelmChart(0xc000f10000, {0xc001358a00?, 0xc000e2f000?, 0xc00039ef00?}, 0xc0011eeff0, 0x0?)
	/home/runner/work/kots/kots/pkg/base/replicated.go:218 +0xfac
github.com/replicatedhq/kots/pkg/base.renderReplicated(0xc000b460c0, 0xc0011eeff0)
	/home/runner/work/kots/kots/pkg/base/replicated.go:136 +0x631
github.com/replicatedhq/kots/pkg/base.RenderUpstream(0x53e4860?, 0xc00035a720?)
	/home/runner/work/kots/kots/pkg/base/render.go:37 +0x6c
github.com/replicatedhq/kots/pkg/pull.Pull({_, _}, {{0x0, 0x0}, {0xc000be6eb8, 0x15}, {0xc00005802e, 0x11}, {0xc000d348f0, 0x1, ...}, ...})
	/home/runner/work/kots/kots/pkg/pull/pull.go:340 +0x19cb
github.com/replicatedhq/kots/pkg/kotsadmupstream.DownloadUpdate({0xc00160c960, 0x1b}, {{0xc000d18ea0, 0x1b}, {0xc00124a058, 0x4}, {0xc001300250, 0x3}, {0xc001300228, 0x8}, ...}, ...)
	/home/runner/work/kots/kots/pkg/kotsadmupstream/upstream.go:226 +0x14b8
github.com/replicatedhq/kots/pkg/updatechecker.processUpdates({{0xc0012186c0, 0x1b}, 0x0, {0x0, 0x0}, 0x0, 0x0, 0x0, 0x0, 0x0}, ...)
	/home/runner/work/kots/kots/pkg/updatechecker/updatechecker.go:317 +0x1de
github.com/replicatedhq/kots/pkg/updatechecker.CheckForUpdates.func1()
	/home/runner/work/kots/kots/pkg/updatechecker/updatechecker.go:306 +0x8e
created by github.com/replicatedhq/kots/pkg/updatechecker.CheckForUpdates
	/home/runner/work/kots/kots/pkg/updatechecker/updatechecker.go:305 +0xd31

Which issue(s) this PR fixes:

Fixes NONE

Special notes for your reviewer:

Steps to reproduce

Does this PR introduce a user-facing change?

Fixed an issue where KOTS would crash if a Helm Chart is included with optional values and no values.

Does this PR require documentation?

NONE

@emosbaugh emosbaugh added type::bug Something isn't working bug::normal labels Jun 29, 2022
@emosbaugh emosbaugh requested a review from divolgin June 29, 2022 13:07
@emosbaugh emosbaugh merged commit ca04746 into main Jun 29, 2022
@emosbaugh emosbaugh deleted the emosbaugh/sc-51661/kots-panic branch June 29, 2022 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug::normal type::bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants