aws-0.22 improved its support for setting etags, which improves support for versioned S3 buckets.
Remove placeholder version number I used when implementing the feature in aws. This commit was sponsored by Ethan Aubin.
This commit is contained in:
parent
c87f73f638
commit
5844a54869
2 changed files with 9 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
git-annex (8.20200909) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* aws-0.22 improved its support for setting etags, which improves
|
||||||
|
support for versioned S3 buckets.
|
||||||
|
|
||||||
|
-- Joey Hess <id@joeyh.name> Mon, 14 Sep 2020 18:34:37 -0400
|
||||||
|
|
||||||
git-annex (8.20200908) upstream; urgency=medium
|
git-annex (8.20200908) upstream; urgency=medium
|
||||||
|
|
||||||
* Added httpalso special remote, which is useful for accessing
|
* Added httpalso special remote, which is useful for accessing
|
||||||
|
|
10
Remote/S3.hs
10
Remote/S3.hs
|
@ -347,10 +347,7 @@ storeHelper info h magic f object p = liftIO $ case partSize info of
|
||||||
resp <- sendS3Handle h req
|
resp <- sendS3Handle h req
|
||||||
vid <- mkS3VersionID object
|
vid <- mkS3VersionID object
|
||||||
<$> extractFromResourceT (S3.porVersionId resp)
|
<$> extractFromResourceT (S3.porVersionId resp)
|
||||||
-- FIXME Actual aws version that supports this is not known,
|
#if MIN_VERSION_aws(0,22,0)
|
||||||
-- patch not merged yet.
|
|
||||||
-- https://github.com/aristidb/aws/issues/258
|
|
||||||
#if MIN_VERSION_aws(0,99,0)
|
|
||||||
etag <- extractFromResourceT (Just (S3.porETag resp))
|
etag <- extractFromResourceT (Just (S3.porETag resp))
|
||||||
return (etag, vid)
|
return (etag, vid)
|
||||||
#else
|
#else
|
||||||
|
@ -685,10 +682,7 @@ rewritePreconditionException a = catchJust (Url.matchStatusCodeException want) a
|
||||||
storeExportWithContentIdentifierS3 :: S3HandleVar -> Remote -> RemoteStateHandle -> S3Info -> Maybe Magic -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex ContentIdentifier
|
storeExportWithContentIdentifierS3 :: S3HandleVar -> Remote -> RemoteStateHandle -> S3Info -> Maybe Magic -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex ContentIdentifier
|
||||||
storeExportWithContentIdentifierS3 hv r rs info magic src k loc _overwritablecids p
|
storeExportWithContentIdentifierS3 hv r rs info magic src k loc _overwritablecids p
|
||||||
| versioning info = go
|
| versioning info = go
|
||||||
-- FIXME Actual aws version that supports getting Etag for a store
|
#if MIN_VERSION_aws(0,22,0)
|
||||||
-- is not known; patch not merged yet.
|
|
||||||
-- https://github.com/aristidb/aws/issues/258
|
|
||||||
#if MIN_VERSION_aws(0,99,0)
|
|
||||||
| otherwise = go
|
| otherwise = go
|
||||||
#else
|
#else
|
||||||
| otherwise = giveup "git-annex is built with too old a version of the aws library to support this operation"
|
| otherwise = giveup "git-annex is built with too old a version of the aws library to support this operation"
|
||||||
|
|
Loading…
Add table
Reference in a new issue