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

Did saving outputs break in 3.10.3 in interactive cells? #713

Open
jlewi opened this issue Dec 6, 2024 · 8 comments
Open

Did saving outputs break in 3.10.3 in interactive cells? #713

jlewi opened this issue Dec 6, 2024 · 8 comments
Assignees

Comments

@jlewi
Copy link
Contributor

jlewi commented Dec 6, 2024

I upgraded to 3.10.3. I have AutoSave Outputs turned on. For interactive cells it doesn't look like the output gets saved
For non-interactive it looks like it gets saved.

Here's an example notebook

testoutputs-01JEE93009ZVJKZVKQXMY9X2TX.md

@sourishkrout
Copy link
Member

I hope not! Looking into this now.

@sourishkrout sourishkrout self-assigned this Dec 6, 2024
@sourishkrout
Copy link
Member

It seems to work fine for me using one of my own examples https://gist.github.com/sourishkrout/de4bf5ad590a3a48bdce29d321f4d445#file-fixture-01jeeeb593arqe9kdz17f0cef8-md

Trying your markdown next.

@sourishkrout
Copy link
Member

Also works: https://gist.github.com/sourishkrout/30cafb7543faac33f10b396643088060#file-testoutputs-01jeeeb593arqe9kdz17f0cef8-md

Using the notebook below. Do you see any errors in Output->Runme or when you open the Developer Tools in VS Code?

testoutputs.md

@jlewi
Copy link
Contributor Author

jlewi commented Dec 7, 2024

This is weird; it seems to be happening in one notebook but not others. I'm not sure what's different.
I'll try to collect more relevant information.

I don't see any obvious errors in the Runme window output

[2024-12-07T01:22:45.278Z] INFO Runme(Kernel): Requesting new runner environment.
[2024-12-07T01:22:45.282Z] ERROR Runme(NotebookPanel): error in monitor RpcError: not available for runner env store

Code: UNKNOWN
Method: runme.runner.v1.RunnerService/MonitorEnvStore

Meta:
  content-type: application/grpc
[2024-12-07T01:22:45.286Z] INFO Runme(Kernel): New runner environment assigned with session ID: 01JEFBCGX04GVRFRKX8CYCNM0F
[2024-12-07T01:22:46.733Z] INFO Runme: handleEvent: building request
[2024-12-07T01:22:46.733Z] INFO Runme: buildRequest: is newCell: false , firstRequest: false, trigger 4
[2024-12-07T01:22:46.734Z] WARN Runme(serializer): no frontmatter found in metadata
[2024-12-07T01:22:46.734Z] WARN Runme(LoggedIn): notebook runme ID not found
[2024-12-07T01:22:46.823Z] ERROR Runme: Error processing response: ConnectError: [unknown] rpc error: code = InvalidArgument desc = ContextId doesn't match current value; expected 01JEFBC0YJDF103SGD0HZNPPBH; got 01JEFBCDYVWJ747DT3D98NEMEG; details: ; rawMessage: rpc error: code = InvalidArgument desc = ContextId doesn't match current value; expected 01JEFBC0YJDF103SGD0HZNPPBH; got 01JEFBCDYVWJ747DT3D98NEMEG
[2024-12-07T01:22:46.823Z] INFO Runme: Stream closed due to error; resetting iterator
[2024-12-07T01:22:54.427Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: undefined; new contextID: 01JEFBCSTTGP5BHHZCNE97NS9Z; old contextID: 01JEFBCDYVWJ747DT3D98NEMEG
[2024-12-07T01:22:58.883Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: file:///Users/jlewi/git_techdocs/notes/jlewi/2024_11_21_create_u26_index_retrieval.md; new contextID: 01JEFBCY626HY0JSMP7H2GBC4D; old contextID: 01JEFBCSTTGP5BHHZCNE97NS9Z
[2024-12-07T01:23:00.051Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: undefined; new contextID: 01JEFBCZAJS7EMJ01MWPJZA7DE; old contextID: 01JEFBCY626HY0JSMP7H2GBC4D
[2024-12-07T01:23:30.660Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: file:///Users/<OBFUSCATED>.md; new contextID: 01JEFBDX74R5P4JGBSHXX1GBYM; old contextID: 01JEFBCZAJS7EMJ01MWPJZA7DE
[2024-12-07T01:23:53.603Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: undefined; new contextID: 01JEFBEKM375BW90BJYFY2ZFBR; old contextID: 01JEFBDX74R5P4JGBSHXX1GBYM
[2024-12-07T01:23:53.631Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: vscode-notebook-cell:/Users/jlewi/git_techdocs/notes/jlewi/demo/testoutputs.md#W1sZmlsZQ%3D%3D; new contextID: 01JEFBEKMYTB643SHGZ4ADSHBK; old contextID: 01JEFBEKM375BW90BJYFY2ZFBR
[2024-12-07T01:23:53.697Z] TRACE Runme: resolving ghost cells failed with true
[2024-12-07T01:23:57.290Z] INFO Runme: handleEvent: building request
[2024-12-07T01:23:57.291Z] INFO Runme: buildRequest: is newCell: false , firstRequest: true, trigger 4
[2024-12-07T01:23:57.291Z] WARN Runme(serializer): no frontmatter found in metadata
[2024-12-07T01:23:57.291Z] WARN Runme(LoggedIn): notebook runme ID not found
[2024-12-07T01:23:58.164Z] TRACE Runme: applyedit resolved with true
[2024-12-07T01:24:06.258Z] INFO Runme: onDidChangeActiveTextEditor fired: editor: output:extension-output-stateful.runme-%231-Runme; new contextID: 01JEFBEZZJVG7ZM0V1ZNYYRRQ1; old contextID: 01JEFBEKMYTB643SHGZ4ADSHBK

@jlewi
Copy link
Contributor Author

jlewi commented Dec 9, 2024

I'll close this as unreproducible until I can provide more actionable error information.

@jlewi jlewi closed this as completed Dec 9, 2024
@jlewi
Copy link
Contributor Author

jlewi commented Dec 13, 2024

I hit this again. In a different notebook. Unfortunately, I can't share the notebook and I don't have any more information on how to reproduce it.

I wonder if its an issue with flushing the xterm to populate the notebookdata? I'm looking at the saved output immediately after running the cell.

This seems somewhat reminiscent of the issue I had with making the output of interactive cells available to Foyle; (see stateful/vscode-runme#1756). In that issue we need to call addExecInfo in order to flush the data from the terminal widget to the VSCode notebook data structure before serializing it.

I think the next step would be to investigate the code path used by session saving to see if/when addExecInfo gets called.

@jlewi jlewi reopened this Dec 13, 2024
@sourishkrout
Copy link
Member

Okay. I'll do more testing on this. Do you have Foyle running the whole time? I haven't explicitly tested with the AI integration, which might could be a factor.

@jlewi
Copy link
Contributor Author

jlewi commented Dec 17, 2024

Yes; I have Foyle running I'll try to see if I can repro it without Foyle next time it occurs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants