NASA-AMMOS / aerie-ui

The client application for Aerie.
https://nasa-ammos.github.io/aerie-docs/
MIT License
29 stars 5 forks source link

Unable to open merge request #1507

Open parkerabercrombie opened 2 days ago

parkerabercrombie commented 2 days ago

Checked for duplicates

No - I haven't checked

Is this a regression?

No - This is a new bug

Version

2.11.2

Describe the bug

Nothing happens when I click "Merge requests" on parent plan. Error in browser console.

Reproduction

1) Create plan branch 1 2) Create plan branch 2 3) Open merge request from branch 1 4) Open merge request from branch 2 5) Delete plan branch 1 6) Cannot open merge requests for parent plan

Logs

modal.BPpzJHMj.js:300 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'name')
    at rW (modal.BPpzJHMj.js:300:54011)
    at dS (modal.BPpzJHMj.js:300:56680)
    at Array.sW (modal.BPpzJHMj.js:300:53048)
    at Array.uW (modal.BPpzJHMj.js:300:58985)
    at bt (scheduler.lIypvzst.js:1:938)
    at sR (modal.BPpzJHMj.js:7:3430)
    at Ct (index.DQ35HaIj.js:4:2972)
    at new Bi (modal.BPpzJHMj.js:7:4042)
    at Array.dW (modal.BPpzJHMj.js:300:64696)
    at bt (scheduler.lIypvzst.js:1:938)

Error line from decompiled code in browser:
`plan_snapshot_supplying_changes.plan` is `null`

function rW(t) {
    let e = t[31].plan_snapshot_supplying_changes.plan.name + "", i;
    return {
        c() {
            i = Fe(e)
        },
        l(s) {
            i = Oe(s, e)
        },
        m(s, n) {
            G(s, i, n)
        },
        p(s, n) {
            n[0] & 256 && e !== (e = s[31].plan_snapshot_supplying_changes.plan.name + "") && it(i, e)
        },

### System Info

```shell
Chrome

Severity

Major

dandelany commented 2 days ago

Thanks @parkerabercrombie - I met with the devs and we understand the issue, and @AaronPlave is working on a code fix. To summarize, if a branched plan is/was a part of a merge request, the UI is not tolerant to that plan being deleted even though deletion is allowed, & deleting it will cause the "merge requests" modal UI to break on any other plans that would show the deleted plan as part of its merge history - even if the merge is accepted/completed.

For workarounds until the code fix can be taken, from lowest impact/risk to highest: