From 41952204ce511ade3e59654c1753e0d0585f5847 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 16 Jun 2020 12:04:29 -0400 Subject: [PATCH] S3: The REDUCED_REDUNDANCY storage class is no longer cheaper So stop documenting it, and stop offering it as a choice in the assistant. Removed the code that parses it into S3.ReducedRedundancy, because S3.OtherStorageClass with the value will work just the same and avoids a special case for a deprecated this. --- Assistant/WebApp/Configurators/AWS.hs | 8 +++----- CHANGELOG | 2 ++ Remote/S3.hs | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Assistant/WebApp/Configurators/AWS.hs b/Assistant/WebApp/Configurators/AWS.hs index e41236eed1..69321e48df 100644 --- a/Assistant/WebApp/Configurators/AWS.hs +++ b/Assistant/WebApp/Configurators/AWS.hs @@ -43,13 +43,14 @@ glacierConfigurator a = do where needglaciercli = $(widgetFile "configurators/needglaciercli") -data StorageClass = StandardRedundancy | StandardInfrequentAccess | ReducedRedundancy +data StorageClass + = StandardRedundancy + | StandardInfrequentAccess deriving (Eq, Enum, Bounded) instance Show StorageClass where show StandardRedundancy = "STANDARD" show StandardInfrequentAccess = "STANDARD_IA" - show ReducedRedundancy = "REDUCED_REDUNDANCY" data AWSInput = AWSInput { accessKeyID :: Text @@ -78,10 +79,7 @@ s3InputAForm defcreds = AWSInput storageclasses :: [(Text, StorageClass)] storageclasses = [ ("Standard redundancy", StandardRedundancy) -#ifdef WITH_S3 , ("Infrequent access (cheaper for backups and archives)", StandardInfrequentAccess) -#endif - , ("Reduced redundancy (costs less)", ReducedRedundancy) ] glacierInputAForm :: Maybe CredPair -> MkAForm AWSInput diff --git a/CHANGELOG b/CHANGELOG index f9e792c9d1..7c7893ef4e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,6 +33,8 @@ git-annex (8.20200523) UNRELEASED; urgency=medium files, to prevent init failing when sqlite does not work in the filesystem. * import: Avoid using some strange names for temporary keys. + * S3: The REDUCED_REDUNDANCY storage class is no longer cheaper so + stop documenting it, and stop offering it as a choice in the assistant. -- Joey Hess Tue, 26 May 2020 10:20:52 -0400 diff --git a/Remote/S3.hs b/Remote/S3.hs index 9bcd793333..c2c5f58c66 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -84,7 +84,7 @@ remote = specialRemoteType $ RemoteType , optionalStringParser partsizeField (FieldDesc "part size for multipart upload (eg 1GiB)") , optionalStringParser storageclassField - (FieldDesc "storage class, eg STANDARD or REDUCED_REDUNDANCY") + (FieldDesc "storage class, eg STANDARD or STANDARD_IA or ONEZONE_IA") , optionalStringParser fileprefixField (FieldDesc "prefix to add to filenames in the bucket") , yesNoParser versioningField False @@ -939,7 +939,6 @@ getBucketName = map toLower <$$> getRemoteConfigValue bucketField getStorageClass :: ParsedRemoteConfig -> S3.StorageClass getStorageClass c = case getRemoteConfigValue storageclassField c of - Just "REDUCED_REDUNDANCY" -> S3.ReducedRedundancy Just s -> S3.OtherStorageClass (T.pack s) _ -> S3.Standard