Skip to content

refactor: extract provider-specific config into ProviderProfile (Strategy)#81

Merged
TheMeinerLP merged 3 commits into
mainfrom
feat/r2-support
Jul 13, 2026
Merged

refactor: extract provider-specific config into ProviderProfile (Strategy)#81
TheMeinerLP merged 3 commits into
mainfrom
feat/r2-support

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Owner

Lands #78's content onto main directly. #78 was squash-merged into the feat/r2-support branch instead of main (stacked-PR base-branch mismatch after #77 squash-merged), so this PR carries that same content forward onto main.

See #78 for the original description of this change.

TheMeinerLP and others added 3 commits July 13, 2026 22:22
Ports the useful parts of Tresillo2017's R2 fork (compare/main...Tresillo2017:BlueMapS3Storage:main)
cleanly: that fork's diff turned out to contain no actual Java changes despite its
CHANGELOG_R2.md describing new R2Storage/R2Configuration classes, just three overlapping
markdown files and an accidentally committed node_modules/.

R2 is S3-compatible, so it already works through the existing themeinerlp:s3 storage type.
Rather than duplicating that as a parallel R2-specific implementation, this adds:

- account-id: optional Cloudflare account ID. When set (and endpoint-url is left empty), the
  endpoint is derived automatically as https://<account-id>.r2.cloudflarestorage.com and
  path-style access is forced on, since R2 only supports path-style.
- list-cache-ttl-seconds: optional TTL cache for mapIds() (map enumeration), since directory
  listings are a billed "Class A" operation on R2. Off by default (0); only affects map
  enumeration at init/reload, not tile reads/writes. (Fixes a pre-existing resource leak in
  mapIds() along the way — the underlying DirectoryStream was never closed.)

Consolidates the fork's R2_GUIDE.md/R2_QUICK_START.md/CHANGELOG_R2.md into a single
docs/cloudflare-r2.md, and documents both new options plus the existing checksum-validation
option (added in #73 but never added to the README) in the main config table.
Resolves the squash-merge ancestry gap left by #77's squash-merge:
this branch had #78's ProviderProfile refactor on top of the
pre-squash commit, so a normal merge against main's post-squash tip
showed spurious conflicts on lines that were actually already
superseded (main's version) by this branch's version (confirmed
identical file-by-file diff before this merge).
@TheMeinerLP
TheMeinerLP merged commit 3793aba into main Jul 13, 2026
3 checks passed
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.

1 participant