Skip to content

Open files on Windows and feasibility of in-process upgrades #178

@jaimergp

Description

@jaimergp

Windows famously disallows two processes from handling the same open file. That means that if a process has opened a file, it might block its manipulation til its closed and released.

This can present an opportunity to create errors in upgrade processes. We need to ensure that:

  • If a certain package has been already imported, we can safely upgrade it to a new version without errors and that the module has been reloaded in-process without breaking anything. This might be tricky to get right so the best choice might be to defer the update to the next napari execution, or to report the user that a restart is needed.
  • There might be a block on write to the opened files. What kind of message do we report here? Can we remember which package failed to install and try again in the next napari run before anything else runs? How can we do that? Should we register an atexit task with the function to be run?
  • and maybe other issues we are not aware of.

The action items involve:

  • Auditing the described scenarios on Windows and making sure the observed issues can be reproduced
  • Come up with a robust workaround strategy
  • Implement the solution

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions