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.
This commit is contained in:
Joey Hess 2020-06-16 12:04:29 -04:00
parent 6dac582f06
commit 41952204ce
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 6 additions and 7 deletions

View file

@ -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

View file

@ -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 <id@joeyh.name> Tue, 26 May 2020 10:20:52 -0400

View file

@ -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