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

[1d] Nbdime error when trying to merge from upstream (blocking FuseMachines) #5

Closed
binocarlos opened this issue Jul 12, 2019 · 10 comments
Assignees
Labels

Comments

@binocarlos
Copy link

When trying to merge an upstream project - nbdime is loading but throwing the following javascript error:

Uncaught (in promise) Error: Invalid merge decision, cannot have null base for deleted cell: [object Object]
    at t.CellMergeModel.applyCellLevelDecision (cell.ts:495)
    at t.CellMergeModel.processDecisions (cell.ts:368)
    at new t.CellMergeModel (cell.ts:134)
    at t.NotebookMergeModel.buildCellList (notebook.ts:237)
    at new t.NotebookMergeModel (notebook.ts:92)
    at merge.ts:75
    at _ (merge.ts:165)
applyCellLevelDecision @ cell.ts:495
processDecisions @ cell.ts:368
t.CellMergeModel @ cell.ts:134
buildCellList @ notebook.ts:237
t.NotebookMergeModel @ notebook.ts:92
(anonymous) @ merge.ts:75
_ @ merge.ts:165
Promise.then (async)
l @ index.ts:100
t.requestMerge @ index.ts:154
m @ merge.ts:105
v @ merge.ts:126
t.initializeMerge @ merge.ts:410
window.onload @ index.ts:45
load (async)
(anonymous) @ index.ts:86
i @ bootstrap:63
(anonymous) @ bootstrap:198
(anonymous) @ bootstrap:198

When looking at the nbdime server - we can see the following error:

[D connectionpool:815] Starting new HTTPS connection (1): cloud.dotscience.net:443
[D connectionpool:396] https://cloud.dotscience.net:443 "GET /v2/projects/33fee5e7-edf8-478e-9158-816d15200b9e/files/snapshot/3d21a38d-d3b9-48d8-9b3d-23bd27a710d1/UsingPytorch.ipynb?shortLivedToken=eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhY2NvdW50X2lkIjoiOGE5ODA4MjAtOTM5MS00NTdlLTkyMDktZjczZTRjOGU5MjM3IiwiZW1haWwiOiJrc2hpdGl6Lm1hbmRhbEBmdXNlbWFjaGluZXMuY29tIiwiZXhwIjoxNTYzMDEyMTY3LCJpYXQiOjE1NjI5MjU3NjcsInN1YiI6IjhhOTgwODIwLTkzOTEtNDU3ZS05MjA5LWY3M2U0YzhlOTIzNyIsInVzZXJuYW1lIjoia3NoaXRpem1hbmRhbCJ9.jKtj5Qt8qTXCa7CTqaWqfgAXcoNVkbN-OLkKAhVJRsG77I8wIEsIzpi4aHH9fNPUaymKpLKlOk5MBKga66OjYw HTTP/1.1" 200 None
[W decisions:227] Unhandled conflict strategy mergetool on /cells/28/source
[W decisions:227] Unhandled conflict strategy mergetool on /cells/28/source
[W decisions:227] Unhandled conflict strategy mergetool on /cells/28/source
[W decisions:227] Unhandled conflict strategy mergetool on /cells/28/source

The JSON response from the /api/merge url (which is proxied to nbdime) is as attached.
merge-error-formatted.zip

@alaric-dotmesh
Copy link

Attached are the notebooks being merged. -mine is the one in the fork, and produces an error in the preview panel. -upstream is the one from origin that's being merged in.

notebooks.zip

@alaric-dotmesh
Copy link

The -mine notebook opens in Jupyterlab, but has a lot of weird blank cells

image

@alaric-dotmesh
Copy link

I tried deleting them and saving the notebook - this caused the nbconvert preview to start working again (it didn't before), but the merge still fails with the same error :-(

@binocarlos
Copy link
Author

Another error when trying to use nbdime to merge:

cell.ts:495 Uncaught (in promise) Error: Invalid merge decision, cannot have null base for deleted cell: [object Object]
    at t.CellMergeModel.applyCellLevelDecision (VM406 nbdime.js:13)
    at t.CellMergeModel.processDecisions (VM406 nbdime.js:13)
    at new t.CellMergeModel (VM406 nbdime.js:13)
    at t.NotebookMergeModel.buildCellList (VM406 nbdime.js:29)
    at new t.NotebookMergeModel (VM406 nbdime.js:29)
    at VM406 nbdime.js:13
    at _ (VM406 nbdime.js:13)

Notebooks: UsingPytorch.zip

@lukemarsden lukemarsden changed the title Nbdime error when trying to merge from upstream Nbdime error when trying to merge from upstream (blocking FuseMachines) Jul 16, 2019
@itamarst itamarst self-assigned this Jul 17, 2019
@itamarst itamarst changed the title Nbdime error when trying to merge from upstream (blocking FuseMachines) [1d] Nbdime error when trying to merge from upstream (blocking FuseMachines) Jul 17, 2019
@itamarst
Copy link

Oooh, PyTorch notebook has images of cells, I feel nostalgic.

@binocarlos
Copy link
Author

I've added a zip file with the base notebook:

UsingPytorch-with-base.zip

@itamarst
Copy link

I was unable to reproduce with the above, but I went back to the original URL and got the attached notebooks which do reproduce.

They reproduce the problem in upstream nbdime as well, so the problem is not specific to this fork.
notebooks.zip

To reproduce:

$ nbmerge-web base.ipynb local.ipynb remote.ipynb

Then look at console in browser.

@itamarst
Copy link

itamarst commented Jul 17, 2019

The specific issue appears to be around cell 43.

The TypeScript assumes removerange is coupled with patch, but in this case there's a conflicting local_then_remote merge decision with addrange and removerange for local and remote respectively.

@itamarst
Copy link

  1. I've learned some of the code, and created a branch null-base-problem (forked off of upstream's master for easier merging to upstream).
  2. I filed an issue with upstream to see if anyone has further suggestions (Conflicting merge decision with both addrange and removerange blows up UI jupyter/nbdime#488)
  3. It's still not working, but perhaps I've made progress? Hard to say.

Will work on this a bit more Thursday or Friday.

@itamarst
Copy link

Submitted PR to upstream: jupyter#489

@itamarst itamarst closed this as completed Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants