gimlet-io / capacitor

A general purpose UI for FluxCD.
Apache License 2.0
565 stars 18 forks source link

Bug: UI crashes on manual reconcile #90

Closed SorsOps closed 5 months ago

SorsOps commented 5 months ago

When clicking reconcile to manually trigger reconciliation of my git repo, the UI completely crashes

react-dom.production.min.js:189 TypeError: Cannot read properties of undefined (reading 'revision')
    at Pr (HelmChartWidget.jsx:8:29)
    at ko (react-dom.production.min.js:167:137)
    at ks (react-dom.production.min.js:290:337)
    at xu (react-dom.production.min.js:280:389)
    at gu (react-dom.production.min.js:280:320)
    at yu (react-dom.production.min.js:280:180)
    at ou (react-dom.production.min.js:271:88)
    at iu (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort._ (scheduler.production.min.js:14:128)
dl @ react-dom.production.min.js:189
react-dom.production.min.js:283 Uncaught TypeError: Cannot read properties of undefined (reading 'revision')
    at Pr (HelmChartWidget.jsx:8:29)
    at ko (react-dom.production.min.js:167:137)
    at ks (react-dom.production.min.js:290:337)
    at xu (react-dom.production.min.js:280:389)
    at gu (react-dom.production.min.js:280:320)
    at yu (react-dom.production.min.js:280:180)
    at ou (react-dom.production.min.js:271:88)
    at iu (react-dom.production.min.js:268:429)
    at S (scheduler.production.min.js:13:203)
    at MessagePort._ (scheduler.production.min.js:14:128)

https://github.com/gimlet-io/capacitor/blob/06ce0975d8cef27c67e223f50dad880f20e40ec4/web/src/HelmChartWidget.jsx#L8

This only occurs when new changes are present, when clicking reconcile and no changes are present all is fine, however if I add a new Kustomization that creates a new helm release , the UI will crash. I'm assuming this is because the helm release status is empty at the time this is occurring