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

fix: assignment to nil map #178

Merged
merged 1 commit into from
Apr 29, 2024
Merged

Conversation

leonsteinhaeuser
Copy link
Contributor

@leonsteinhaeuser leonsteinhaeuser commented Apr 29, 2024

Description

Fixed assignment to nil map.

panic: assignment to entry in nil map [recovered]
	panic: assignment to entry in nil map
goroutine 193 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:116 +0x1e5
panic({0x17bf240?, 0x1c537d0?})
	/opt/hostedtoolcache/go/1.21.7/x64/src/runtime/panic.go:914 +0x21f
github.com/urbanmedia/passbolt-operator/pkg/util.UpdateSecret.func1()
	/home/runner/work/passbolt-operator/passbolt-operator/pkg/util/secret.go:67 +0x865
sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.mutate(0xc0074bf400?, {{0xc0000513b0?, 0x0?}, {0xc000536ca0?, 0x1c70f68?}}, {0x1c84040, 0xc0074bf400})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/controller/controllerutil/controllerutil.go:426 +0x49
sigs.k8s.io/controller-runtime/pkg/controller/controllerutil.CreateOrUpdate({0x1c70f68, 0xc007269440}, {0x1c79560, 0xc0001286c0}, {0x1c84040?, 0xc0074bf400}, 0xc0000513b0?)
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/controller/controllerutil/controllerutil.go:292 +0x246
github.com/urbanmedia/passbolt-operator/internal/controller.(*PassboltSecretReconciler).Reconcile(0xc0003a8040, {0x1c70f68, 0xc007269440}, {{{0xc0000513b0, 0x14}, {0xc000536ca0, 0x19}}})
	/home/runner/work/passbolt-operator/passbolt-operator/internal/controller/passboltsecret_controller.go:113 +0x869
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x1c743c0?, {0x1c70f68?, 0xc007269440?}, {{{0xc0000513b0?, 0xb?}, {0xc000536ca0?, 0x0?}}})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:119 +0xb7
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0003a2000, {0x1c70fa0, 0xc00009c8c0}, {0x183e520?, 0xc0005943e0?})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:316 +0x3cc
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0003a2000, {0x1c70fa0, 0xc00009c8c0})
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:266 +0x1af
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:227 +0x79
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 151
	/home/runner/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:223 +0x565

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@leonsteinhaeuser leonsteinhaeuser self-assigned this Apr 29, 2024
@github-actions github-actions bot added fix size/XS Denotes a PR that changes 0-49 lines, ignoring generated files. labels Apr 29, 2024
@leonsteinhaeuser leonsteinhaeuser marked this pull request as ready for review April 29, 2024 14:56
@leonsteinhaeuser leonsteinhaeuser requested a review from a team as a code owner April 29, 2024 14:56
@leonsteinhaeuser leonsteinhaeuser requested a review from a team April 29, 2024 14:56
@leonsteinhaeuser leonsteinhaeuser merged commit bde29c6 into main Apr 29, 2024
13 checks passed
@leonsteinhaeuser leonsteinhaeuser deleted the fix/assignment-to-nil-map branch April 29, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix size/XS Denotes a PR that changes 0-49 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants