radius-project / dashboard

Frontend experience for Project Radius
15 stars 7 forks source link

Resources view crashes when parent environment deleted #65

Closed willtsai closed 7 months ago

willtsai commented 8 months ago

Steps to reproduce

  1. Deploy an application (e.g. the getting started sample app).
  2. Delete the environment to which the application has been deployed, but do not delete the application.
  3. Navigate to the "Resources" tab in the Dashboard

Observed behavior

The page crashes with the following error:

Error
TypeError

Message
Cannot read properties of null (reading 'scrollWidth')

Stack Trace
TypeError: Cannot read properties of null (reading 'scrollWidth')
    at pe.value (http://localhost:8001/static/module-backstage.90137cf3.js:37:197926)
    at Ya (http://localhost:8001/static/module-react-dom.e70bfe01.js:14:1661)
    at qa (http://localhost:8001/static/module-react-dom.e70bfe01.js:16:5000)
    at O.unstable_runWithPriority (http://localhost:8001/static/vendor.67e48f7d.js:147:3895)
    at Ze (http://localhost:8001/static/module-react-dom.e70bfe01.js:12:38411)
    at nn (http://localhost:8001/static/module-react-dom.e70bfe01.js:16:1786)
    at Si (http://localhost:8001/static/module-react-dom.e70bfe01.js:14:10983)
    at http://localhost:8001/static/module-react-dom.e70bfe01.js:12:38633
    at O.unstable_runWithPriority (http://localhost:8001/static/vendor.67e48f7d.js:147:3895)
    at Ze (http://localhost:8001/static/module-react-dom.e70bfe01.js:12:38411)

Desired behavior

The "orphaned" resources continue to be displayed, but contain a warning about their "parent" environment having been deleted.

Workaround

No response

Additional context

No response

Would you like to support us?

AB#12040

nithyatsu commented 7 months ago

I dont see this behavior anymore. When I delete an environment, the applications and resources in the env also get deleted. I will test a few more scenarios.

willtsai commented 7 months ago

I am also getting the same results on both v0.32 and v0.33 where the app gets deleted along with the env and thus the Dashboard crash does not happen (it accurately shows "no records to display").

image

The environment deletion behavior is a bit unclear, however, of the implication that the apps would get deleted along with the env deletion. Thus, @nithyatsu created this additional issue to request enhancement in the env deletion flow to make this clear: https://github.com/radius-project/radius/issues/7529

willtsai commented 7 months ago

given that the state of the environment is not reproducible, we are closing this for now, please reopen if the issue persists.