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: download snapshots from CloudFlare #3492

Merged
merged 5 commits into from
Sep 18, 2023
Merged

Conversation

lemmih
Copy link
Contributor

@lemmih lemmih commented Sep 14, 2023

Summary of changes

Changes introduced in this pull request:

  • Download snapshots from CloudFlare.
  • Use reqwest instead of aria2c.
  • Log to stderr in forest-tool.

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

@lemmih
Copy link
Contributor Author

lemmih commented Sep 14, 2023

aria2c is no longer needed now that the snapshots are downloaded from a CDN.

@lemmih lemmih marked this pull request as ready for review September 14, 2023 12:46
@lemmih lemmih requested a review from a team as a code owner September 14, 2023 12:46
@lemmih lemmih requested review from hanabi1224 and elmattic and removed request for a team September 14, 2023 12:46
@lemmih lemmih marked this pull request as draft September 14, 2023 13:05
@lemmih lemmih marked this pull request as ready for review September 14, 2023 13:42
Copy link
Contributor

@elmattic elmattic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Generally speaking, for user facing binaries(forest-cli/forest-tool) shouldn't we use progress bars and not progress logs?

src/cli_shared/snapshot.rs Show resolved Hide resolved
@LesnyRumcajs
Copy link
Member

aria2c is no longer needed now that the snapshots are downloaded from a CDN.

Did you compare the speed of both approaches?

@lemmih
Copy link
Contributor Author

lemmih commented Sep 18, 2023

aria2c is no longer needed now that the snapshots are downloaded from a CDN.

Did you compare the speed of both approaches?

My download speed in Europe from CloudFlare is top-notch. Hailong tested from China and got 12MiB/s from CloudFlare (using wget) and only 300KiB/s from DO (using aria2c -x5). CloudFlare has much better bandwidth than non-cdn DO.

@lemmih lemmih added this pull request to the merge queue Sep 18, 2023
Merged via the queue into main with commit a042f39 Sep 18, 2023
@lemmih lemmih deleted the lemmih/cf-download-link branch September 18, 2023 12:06
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.

4 participants