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

Cache entirely based upon URLs. #296

Merged
merged 28 commits into from
Nov 9, 2014
Merged

Conversation

pjf
Copy link
Member

@pjf pjf commented Nov 9, 2014

This includes and builds upon #282. Compared to it:

  • More aggressively cache succesful downloads
  • More aggressively clean up temp files
  • No longer try to download the same URL twice, at the same time
  • Fixed double-store bug in NetFileCache and LocalRepo #282.
  • NetCache is much smaller, and no longer requires a temp dir
  • Fixed bug where hashes used in our filenames could contain slashes.
  • Tests included.

Our Async file operations still do a poor job of signalling errors, but that's a different issue.

Closes #111.

AlexanderDzhoganov and others added 25 commits November 7, 2014 10:49
Currently this fails, I expect it should succeed.
We can make IsCached much shorter, right?
Basic Store/Retrieve test on the new file cache.
* origin/master:
  NetKAN: Search Github assets to only download zipfile.
  ModuleManager can once again be installed.
  Test demonstrating bug in GetLeadingPathElements
  Further tests to ModuleInstaller.
  Added a disposable KSP manager for testing.
  More tests for path utils.
  Fixed the mess I made in ModuleInstaller
  Test: ModuleInstaller destination path
  Refactor KSP cloning functions to TestData class.
  Now removing leading parts of paths in FindInstallableFiles. Also added path utility methods (and tests) to KSPPathUtils
- NetCache no longer requires a temp dir.
- No longer move files by default.
- Fixed serious bug where our generated hashes could contain slashes.
- NetCache is now file transaction aware.
* bugfix_i_broke_netkan:
  I brokez the NetKAN. This fixes it.
Previously we could get back a previously cached file from what we put
in! Now we do the right thing and always remove old entries.
It still doesn't do anything useful on error. :(
@pjf pjf mentioned this pull request Nov 9, 2014
@pjf
Copy link
Member Author

pjf commented Nov 9, 2014

Alas, this looks like it still has a bug, and somehow is managing to give files descriptive names which have nothing to do with their contents.

The CKAN core is fine with this, but it confuses the hell outta us humans.

pjf added 2 commits November 9, 2014 16:49
Introduced in KSP-CKAN#287. Oops.

Have tested with our mods that install to GameRoot, and they seem to be
fine.

Have not tested with tutorials. I think they're fine, but we may see
another PR after this.
* fix_ships_installs:
  Fixed a bug where ships could no longer be installed.
This was harmless to CKAN operation, but sure made things confusing
for humans.
@pjf
Copy link
Member Author

pjf commented Nov 9, 2014

Bug with wrong cache names fixed. Also incorporates #297 , so I could test installing oodles of mods.

AlexanderDzhoganov added a commit that referenced this pull request Nov 9, 2014
Cache entirely based upon URLs.
@AlexanderDzhoganov AlexanderDzhoganov merged commit dbe344d into KSP-CKAN:master Nov 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow file caching by URL, not (just) filename
2 participants