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

when vscode restarts with a remote file in the active tab, it would never resync with the remote source. #440

Open
4 tasks
alexbodn opened this issue Sep 13, 2024 · 2 comments
Labels
question Further information is requested

Comments

@alexbodn
Copy link

Development environment used

  • Z Open Editor version:
  • Editor Platform
    • [*] Visual Studio Code
    • Red Hat CodeReady Workspaces
    • Eclipse Che
    • Standalone Theia
  • Editor Platform Version: last stable
  • Operating System (on which VS Code runs such as Windows 10 2004, otherwise name and version of platform such as OpenShift v4.3): debian bookworm stable
  • Java Version (when using VS Code or Theia, execute java -version and paste the details here): OpenJDK 64-Bit Server VM (build 17.0.12+7-Debian-2deb12u1, mixed mode, sharing)
  • Related to RSE API?
    • RSE API Plugin version:
    • Zowe CLI version:
    • Node.js version:
  • Logs attached (see here how to get them): yes/no

Problem Description

Detailed steps for reproducing the problem:

  1. First step

Observed behavior

  • opened a few files from the mainframe, and one of them should be in the active tab.
  • turn off linux with vscode abruptly. don't know whether it should be abruptly, but probably the secrets holding daemon should be down to prevent auto reconnection.
  • open vscode.
  • the previously open files will load from the extension's cache.
  • the following problem will show:
  • [{
    "resource": "/home/alex/.vscode/extensions/zowe.vscode-extension-for-zowe-2.18.0/resources/temp/D/zosmf/Z55367.CBL(CBLDB23).cbl",
    "owner": "zowe-explorer",
    "severity": 8,
    "message": "File content is out of sync with zosmf: Z55367.CBL(CBLDB23)",
    "startLineNumber": 1,
    "startColumn": 1,
    "endLineNumber": 137,
    "endColumn": 1
    }]
  • this is the active file, but files in the other tabs get open the same.
  • open the zos explorer
  • open the filtered data sets.
  • the files open in the other tabs silently sync, while the one in the active tab does not.
  • i did try to reopen the file in the editor and even pull the same file from the mainframe, with no success.

now i see that i was complaining about the smaller problem:

  • when just closing vscode without closing the secret daemon, all the remote files show "the editor could not be opened because the file was not found".
  • i can go to the file in the explorer and pull it from the mainframe. this works for every file, even for that active one i couldn't pull in the daemon restart situation.

Expected behavior

  • i would like all the files to be resynced with the mainframe, either automatically as the files in inactive tabs did when the explorer got loaded and the secret daemon restarted, or at least manually as connection may be lost at any time even without restarting linux.
  • it should probably work as the temp file is the version in the editor, while the file on the mainframe is the last saved version on the disk, and give the programmer the opportunity to see unsaved changes.
  • to ease the manual reloading of the files, i'd ask the pull from the mainframe action to be available in the context menu of the tab label, so the programmer wouldn't have to recollect all the datasets in the explorer.
@phaumer
Copy link
Member

phaumer commented Sep 16, 2024

Did you check the zowe.files.temporaryDownloadsFolder.cleanup setting? We had the "security" requirement that when Z Open Editor shuts down that there should be no source files left on the local system, so all temporary downloads will be cleaned up at shutdown and startup (in case the editor crashed). With this setting you can prevent the cleaning part.

However, for Zowe Explorer v3 temporary file storage will be replaced with a new mechanism using vscode.FileSystemProvider. Will update here with more details once I collected them all, however, this is definitely a discussion for the Zowe Explorer team and less Z Open Editor.

@phaumer phaumer added the question Further information is requested label Sep 16, 2024
@alexbodn
Copy link
Author

alexbodn commented Sep 18, 2024 via email

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

No branches or pull requests

2 participants