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

[BUG] Problematic implementation of the mirror #47

Open
ericdill opened this issue May 10, 2017 · 0 comments
Open

[BUG] Problematic implementation of the mirror #47

ericdill opened this issue May 10, 2017 · 0 comments
Labels

Comments

@ericdill
Copy link
Contributor

Through reviewing #45, I've discovered a bug in the current implementation of the mirror. The problematic aspect is as follows:

  1. _validate_packages can remove packages on disk that exist in the local repodata.json file
  2. The local repodata.json file is not updated before that problematic file is removed
  3. This means that a user of the condaserver can ask for a package that conda thinks it has (since it is still in repodata.json) but that it can't find (because it's been removed from disk)

As such, this code needs to be changed so that

  1. _validate_packages returns a list of packages to remove
  2. a new dict of package metadata is created that does not contain the packages that we are going to remove
  3. That new package metadata dict is written to disk as an atomic operation
  4. The problematic files are removed

With the above changes we will reduce the chance that the user will encounter an error from conda saying that the file cannot be found on the conda server. This is not a blocking issue on getting this PR merged. I'll fix this problem in a follow-on PR

@ericdill ericdill added the bug label May 10, 2017
@ericdill ericdill self-assigned this May 10, 2017
@ericdill ericdill removed their assignment Oct 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant