Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

CLI make_local creates local data source even if the command fails #193

Closed
forman opened this issue Apr 19, 2017 · 10 comments
Closed

CLI make_local creates local data source even if the command fails #193

forman opened this issue Apr 19, 2017 · 10 comments
Assignees
Milestone

Comments

@forman
Copy link
Member

forman commented Apr 19, 2017

CLI make_local creates a local data source even if the command is cancelled or otherwise fails, e.g. no internet connection, or no source files found. After this, it cannot be corrected.

Reproduce:

  1. Call cate ds make_local <id-1> <id-2> <time>
  2. Cancel running command, then run again.

Workaround:

Delete concerned local data source manually.

Fix:

If make_local() fails, it should keep all "good" files, but remember that it is incomplete so we can update calling the command again with same data source ID.

@forman forman added this to the IPM4 milestone Apr 19, 2017
@forman
Copy link
Member Author

forman commented Apr 20, 2017

It is fully legal that the download of local data sources is being interrupted by means of

  • networking problems
  • disk full
  • files not found / renamed / moved
  • internal errors / Python exceptions

And it is crucial that the downloading can be continued later where all completely downloaded files are being preserved and incomplete ones are being deleted or overwritten.

An incomplete local data source shall be indicated as such so that we can display this fact in the CLI and GUI.

@JanisGailis
Copy link
Member

In addition to this, I'm seeing the following pattern: I include make_local in a notebook, or a script, but then, if I run the script more than once, make_local will raise an error because the given local_name already exists, so I then ignore the error and open the dataset which I know exists.

I'm not sure what would be the most elegant interface to solve this.

@kbernat
Copy link
Collaborator

kbernat commented Apr 20, 2017

perhaps we need some 'override' option

@JanisGailis
Copy link
Member

Yeah, something like that. I thought of 'overwrite', but then, I wouldn't want to download the dataset again and again.

Maybe 'update_local' could also do what 'make_local' does, if the dataset doesn't exist. I'm not really sure how to solve this best.

@mzuehlke
Copy link
Collaborator

If make_local is called with the same arguments it should be checked if the local copy is complete:

  • if yes return it
  • if no continue copying

If make_local is called with different arguments raise an exception like now.
No new parameter needed.

How about this ?

For the GUI / CLI we may need the information that a dataset has only been downloaded partially.

@forman
Copy link
Member Author

forman commented Apr 21, 2017

I full agree with @mzuehlke

@forman
Copy link
Member Author

forman commented Sep 15, 2017

Cancellation works fine, but incomplete files remain. Cancelled data source should dissapear without a trace from the user's file system. Reopening because it is incomplete.

@forman forman reopened this Sep 15, 2017
@forman
Copy link
Member Author

forman commented Sep 21, 2017

@kbernat any news here?

@forman forman modified the milestones: IPM5, 1.0 Sep 21, 2017
@kbernat
Copy link
Collaborator

kbernat commented Sep 21, 2017

@forman I will review and complete fix yet today..

@kbernat
Copy link
Collaborator

kbernat commented Sep 26, 2017

fixed in #375

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

No branches or pull requests

4 participants