From 50af8467e3e30010fdb937cfa732ac17462b0864 Mon Sep 17 00:00:00 2001 From: jpds Date: Tue, 24 Jan 2023 15:55:36 +0000 Subject: [PATCH] Added a comment --- ..._f17018fbc7a8205a3ef0bdea74069fb9._comment | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 doc/bugs/S3_remote_errors_with_garage_endpoint/comment_4_f17018fbc7a8205a3ef0bdea74069fb9._comment diff --git a/doc/bugs/S3_remote_errors_with_garage_endpoint/comment_4_f17018fbc7a8205a3ef0bdea74069fb9._comment b/doc/bugs/S3_remote_errors_with_garage_endpoint/comment_4_f17018fbc7a8205a3ef0bdea74069fb9._comment new file mode 100644 index 0000000000..4a3bdc1a7b --- /dev/null +++ b/doc/bugs/S3_remote_errors_with_garage_endpoint/comment_4_f17018fbc7a8205a3ef0bdea74069fb9._comment @@ -0,0 +1,53 @@ +[[!comment format=mdwn + username="jpds" + avatar="http://cdn.libravatar.org/avatar/24d746ec6a7726b162c12ecceb3ee267" + subject="comment 4" + date="2023-01-24T15:55:36Z" + content=""" +I think this can all be removed as only the 'region' should be in the `S3.*` calls: + +``` +diff --git a/Remote/S3.hs b/Remote/S3.hs +index f5014202e..d017378a8 100644 +--- a/Remote/S3.hs ++++ b/Remote/S3.hs +@@ -913,14 +913,7 @@ s3Configuration c = cfg + Nothing -> S3.s3RequestStyle cfg + } + where +- h = fromJust $ getRemoteConfigValue hostField c + datacenter = fromJust $ getRemoteConfigValue datacenterField c +- -- When the default S3 host is configured, connect directly to +- -- the S3 endpoint for the configured datacenter. +- -- When another host is configured, it's used as-is. +- endpoint +- | h == AWS.s3DefaultHost = AWS.s3HostName $ T.pack datacenter +- | otherwise = T.encodeUtf8 $ T.pack h + port = case getRemoteConfigValue portField c of + Just s -> + case reads s of +@@ -948,8 +941,8 @@ s3Configuration c = cfg + | otherwise -> AWS.HTTP + cfg = case getRemoteConfigValue signatureField c of + Just (SignatureVersion 4) -> +- S3.s3v4 proto endpoint False S3.SignWithEffort +- _ -> S3.s3 proto endpoint False ++ S3.s3v4 proto datacenter False S3.SignWithEffort ++ _ -> S3.s3 proto datacenter False + + data S3Info = S3Info + { bucket :: S3.Bucket +``` + +But now I get this as an error and I do not know why: + +``` +initremote garage (checking bucket...) (creating bucket in garage...) +git-annex: getRemoteConfigValue datacenter found value of unexpected type [Char]. This is a bug in git-annex! +CallStack (from HasCallStack): + error, called at ./Annex/SpecialRemote/Config.hs:179:28 in main:Annex.SpecialRemote.Config + getRemoteConfigValue, called at ./Remote/S3.hs:916:33 in main:Remote.S3 +failed +initremote: 1 failed +``` +"""]]