s3: should retry on common errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
goamz |
New
|
Undecided
|
Unassigned |
Bug Description
Here's a test failure from juju-core:
13:38.343 live_test.go:343:
13:38.351 c.Assert(err, IsNil)
13:38.351 ... value *errors.errorString = &errors.
We can do the retry within juju, but it would be nice if a similar approach
could be taken to goamz/ec2.
Unfortunately it's not going to be possible to retry PutReader, as the
http request will have read some of the Reader before failing.
Perhaps we could provide a way of asking if an error is temporary
or not, so clients don't have to hard-code the possible kinds of error.
There's probably a way to take advantage of the existing `aws/attempt.go` to accomplish this. Look at how `GetReader` works and the `shouldRetry` method.
Same kind of idea could be implemented for Puts, no?