MerginMaps / MerginMaps/python-api-client

Cleanup of failed download may misbehave

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
23
Forks
12
Avg merge
2d 13h
Merged PRs (30d)
7

Description

Sometimes if a download fails, the subsequent cleanup of the project directory may fail as well: https://github.com/MerginMaps/qgis-mergin-plugin/issues/442#issuecomment-1212909680
While it looks like some other app is using the downloaded files, it is possible that we are doing the cleanup too early - e.g. in download_project_is_running() we do the cleanup while some other futures may be still active: we should wait until all jobs are done before doing any cleanup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at download_project_is_running() and trace how project-directory cleanup relates to the other active futures. Use the linked Mergin Maps issue for the reported failure scenario. Done means cleanup waits until all download jobs have finished and no longer fails when a download fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.