Skip to content

Integrate R2 (or similar S3 apis) - #77

Merged
dankmeme01 merged 14 commits into
mainfrom
r2
Jul 20, 2026
Merged

dankmeme01 merged 14 commits into
mainfrom
r2

Conversation

@FireMario211

@FireMario211 FireMario211 commented Jul 13, 2026 •

Copy link
Copy Markdown
Member

Adds a new column: managed_download_link, which is used to redirect downloads and is prioritized over download_link. Once a mod is approved, the index asynchronously re-uploads the .geode file to the S3 storage, if it is enabled, and updates managed_download_link. This lets us serve downloads from the fast and reliable Cloudflare R2 storage and not worry about mods becoming undownloadable if someone messes up their repository or such.

There is a migration that runs every time the server is started and uploads mods to S3 that do not have the managed link set. The criteria for a specific mod version to be auto migrated to S3 upon startup are:

  • The mod version is approved
  • The mod version targets a GD version we currently support (currently 2.2081 and 2.2082)
  • The mod version is the latest version of the given mod to support its GD version. This could mean for example, if we choose to support 2.2074 and 2.2081, a mod could have up to 2 versions auto migrated: the latest one to target 2.2074 and the latest to target 2.2081.

This PR also has some unrelated refactors, such as small idiomatic Rust improvements and the use of a single reqwest::Client in the entire index instead of creating a new client per http request.

@Fleeym

Fleeym commented Jul 13, 2026

Copy link
Copy Markdown
Member

By the way, wait for #78 to merge, it simplifies storage.rs and you can implement a backend for it.

@Fleeym

Fleeym commented Jul 15, 2026

Copy link
Copy Markdown
Member

Forgot to mention that it's merged now.

@dankmeme01
dankmeme01 marked this pull request as ready for review July 18, 2026 17:05
@dankmeme01
dankmeme01 merged commit 1000545 into main Jul 20, 2026
2 checks passed
@dankmeme01
dankmeme01 deleted the r2 branch August 29, 2026 18:31
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.

3 participants