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

Unable to open merge request #1507

Open
parkerabercrombie opened this issue Oct 14, 2024 · 1 comment · May be fixed by #1508
Open

Unable to open merge request #1507

parkerabercrombie opened this issue Oct 14, 2024 · 1 comment · May be fixed by #1508
Assignees
Labels
bug Something isn't working clipper Requests from the Europa Clipper project

Comments

@parkerabercrombie
Copy link

parkerabercrombie commented Oct 14, 2024

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

@parkerabercrombie parkerabercrombie added bug Something isn't working clipper Requests from the Europa Clipper project labels Oct 14, 2024
@dandelany
Copy link
Collaborator

dandelany commented Oct 14, 2024

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:

  • Avoid deleting branch plans that have been merge requested, regardless of whether they were accepted. This will stop the issue from reoccurring but doesn't fix existing plans that are in this state.
  • For plans that have this issue - the "merge requests" UI is inaccessible but you should still be able to start a merge request successfully by making an API call - here are the docs for doing merge requests via API
  • Another way to fix the UI for these plans is to remove the problematic merge request records from the merge_request table (specifically, requests where the snapshot_id_supplying_changes has a null plan_id). However, note that this is a destructive change - the plan itself won't be modified, but you will lose the record of the past merge in the merge requests list.
  • Finally, if you need to get the "merge request" modal UI working again for these plans and you need to preserve their merge request history, the only option may be to perform some "database surgery" which would require direct SQL admin access. Specifically, we could insert some "fake plans"/make new branches of the plan, and then manually update the plan snapshots specified by snapshot_id_supplying_changes to point to these new plans instead of null, which would give them some data to display in the UI and fix the issue. This carries some risk (modifying production data) but we could rehearse in a local environment and give you specific instructions if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working clipper Requests from the Europa Clipper project
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants