Skip to content

More spohisticated retry for iam  #14

@bartlomiej-malecki

Description

@bartlomiej-malecki

Currently ibm iam client can be initialized with number of retries via aws.Config

https://github.com/IBM/ibm-cos-sdk-go/blob/master/aws/credentials/ibmiam/tokenmanager/client.go#L65

It will retry the failed request even if the response was e.g. 404

Ideally - ibm iam client could also use Retryer from config
https://github.com/IBM/ibm-cos-sdk-go/blob/master/aws/config.go#L108

	// Retryer guides how HTTP requests should be retried in case of
	// recoverable failures.
	//
	// When nil or the value does not implement the request.Retryer interface,
	// the client.DefaultRetryer will be used.
	//
	// When both Retryer and MaxRetries are non-nil, the former is used and
	// the latter ignored.
	//
	// To set the Retryer field in a type-safe manner and with chaining, use
	// the request.WithRetryer helper function:
	//
	//   cfg := request.WithRetryer(aws.NewConfig(), myRetryer)
	//
	Retryer RequestRetryer

https://github.com/IBM/ibm-cos-sdk-go/blob/master/aws/request/retryer.go#L20:L35

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions