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

panic: runtime error: invalid memory address or nil pointer dereference #861

Open
SorsOps opened this issue May 17, 2024 · 1 comment
Open

Comments

@SorsOps
Copy link

SorsOps commented May 17, 2024

I'm using a gimlet configuration file with the manifests key like so :

app: foo
env: default
namespace: apps
deploy:
  branch: master
  event: push
manifests: | 
  apiVersion: v1
  kind: Namespace
  metadata:
    name: example
  ---
  apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: HelmRepository
metadata:
  name: foo
  namespace: bar
spec:
  interval: 60m
  url:  <REDACTED>

---

apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  name: bar
  namespace: bar
spec:
  interval: 60m
  releaseName: bar
  chart:
    spec:
      chart: bar
      version: 0.0.1
      sourceRef:
        kind: HelmRepository
        name: foo
      interval: 10m
  #etc

This seems to deploy correctly through the use of the gimlet-io/gimlet-artifact-shipper-action action on github, however I cannot actually view the configuration in the Gimlet UI as this causes a panic. I understand it won't be formatted according to the standard one chart definition, but I would expect to see something about the configuration in the UI for developers

   panic: runtime error: invalid memory address or nil pointer dereference

-> github.com/gimlet-io/gimlet/pkg/dx.ChartSchema
->   /home/runner/work/gimlet/gimlet/pkg/dx/helm.go:130

  github.com/gimlet-io/gimlet/pkg/dashboard/server.deploymentTemplates
    /home/runner/work/gimlet/gimlet/pkg/dashboard/server/api.go:524
  github.com/gimlet-io/gimlet/pkg/dashboard/server.deploymentTemplateForApp
    /home/runner/work/gimlet/gimlet/pkg/dashboard/server/api.go:499
  net/http.HandlerFunc.ServeHTTP
    /opt/hostedtoolcache/go/1.22.1/x64/src/net/http/server.go:2166
  github.com/gimlet-io/gimlet/pkg/dashboard/server/session.MustUser.func1.1
    /home/runner/work/gimlet/gimlet/pkg/dashboard/server/session/session.go:101
  net/http.HandlerFunc.ServeHTTP
    /opt/hostedtoolcache/go/1.22.1/x64/src/net/http/server.go:2166
  github.com/gimlet-io/gimlet/pkg/dashboard/server/session.SetCSRF.func1.1
    /home/runner/work/gimlet/gimlet/pkg/dashboard/server/session/session.go:83
  net/http.HandlerFunc.ServeHTTP
    /opt/hostedtoolcache/go/1.22.1/x64/src/net/http/server.go:2166
  github.com/gimlet-io/gimlet/pkg/dashboard/server/session.SetUser.func1.1
    /home/runner/work/gimlet/gimlet/pkg/dashboard/server/session/session.go:61
  net/http.HandlerFunc.ServeHTTP
    /opt/hostedtoolcache/go/1.22.1/x64/src/net/http/server.go:2166
  github.com/go-chi/chi/v5/middleware.Timeout.func1.1
    /home/runner/go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/timeout.go:44

    ```
@laszlocph
Copy link
Contributor

Let us fix this. Thank you for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants