Repository navigation
fix(auth): use default R2 endpoint for import-child s3 checks (0.27.1) - #192
Merged
Merged
Conversation
#190) The 0.27.0 S3 rewrite still false-failed every import-source S3 endpoint. An import child's remote config lives in another repo, not the local .dvc/config, so `_resolve_s3_remote_settings` recovered the per-repo profile (from the source repo name) but left `endpoint_url` as None. boto3 then talked to real AWS S3 instead of the R2 endpoint, and every bucket reported "endpoint unreachable / timed out" against `AWS S3`. Fall back to the org-wide `secrets.default_endpointurl` when no per-remote endpoint is found — these per-repo remotes all share it. Verified on the portal project: s3://chromium, visium, wgs, wts, xenium all go from "unreachable (AWS S3)" to "credentials OK (profile 'bcarc_<x>'), bucket accessible" against R2. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #191. Re #190.
The remaining false failures
After #191 merged,
dt auth check --type s3still false-failed every import-source S3 endpoint. On theportalproject:Root cause
An import child's remote config lives in the source repo, not the local
.dvc/config. So_resolve_s3_remote_settingsrecovered the per-repo profile (from the source repo name, e.g.bcarc_chromium) but leftendpoint_url = None. boto3 then defaulted to real AWS S3 instead of the Cloudflare R2 endpoint — hence "unreachable / timed out" againstAWS S3for every bucket. (The hint printingAWS S3was the tell.)Fix
Fall back to the org-wide
secrets.default_endpointurl(dt config) when no per-remote endpoint URL is found. These per-repo R2 remotes all share one endpoint, so this is exactly right, and it only fills the gap — a remote whose own config supplies an endpoint keeps it.Verified on
portal(real R2)All six go from ✗ "unreachable (AWS S3)" to ✓ "credentials OK … bucket accessible" — matching the ground truth in #190 (all were actually healthy).
Tests
Added
test_import_child_falls_back_to_default_endpointandtest_local_endpoint_not_overridden_by_default; hardened the existing resolve test.test_auth.py337 passed.Version 0.27.0 → 0.27.1.
🤖 Generated with Claude Code