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

feat: improve cdn downloads #935

Open
wants to merge 27 commits into
base: main
Choose a base branch
from

Conversation

Misieq01
Copy link
Collaborator

@Misieq01 Misieq01 commented Oct 25, 2024

#891 #905 #892

[ Content ]

  • Added caching for each of versions list that we download for binaries
  • Added caching of metadata needed to handle caching versions list ( githubEtag, mirrorEtag, file_path ))
  • Added mechanism to decide if we should use cached versions list or download them based on comparing eTags and checking if files exists
  • Improved mirror downloading by sending head request fist and checking cf-cache-status header if returns `HIT

[ Testing ]

  • Remove binaries and cache from tari cache dir:
    /// - **Linux:** Resolves to $XDG_CACHE_HOMEor$HOME/.cache.
    /// - **macOS:** Resolves to $HOME/Library/Caches.
    /// - **Windows:** Resolves to {FOLDERID_LocalAppData}.
  • set should_check_for_update in main.rs to true ( it will help with testing )as it force app to check for new binaries versions online, by default it happens once per 6 hours
  • After app setup is done you should see binaries and cache present and cache/binaries_versions should include jsons with version releases list
  • Logs should include entries from RequestClient.check_if_cache_hits about checking cf-cache-status values and there should also be logs from CacheJsonFile about cache mechanism working

@Misieq01 Misieq01 marked this pull request as draft October 25, 2024 07:35
@brianp brianp requested a review from leet4tari October 25, 2024 09:13
@Misieq01 Misieq01 marked this pull request as ready for review October 25, 2024 14:17
@brianp brianp added the on hold Issue is being held for progress later label Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Issue is being held for progress later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants