-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SDK tweaks #276
SDK tweaks #276
Conversation
…to detected when unspecified
8603653
to
8e7cca8
Compare
8e7cca8
to
95cb391
Compare
…data schema version
8614a5f
to
e8599ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments inline but otherwise 👍
} | ||
|
||
req.URL.RawQuery = query.Encode() | ||
//req.RetryFunc = client.RequestRetryAny(defaultRetryFunctions...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be exposing EnableRetries
if it does nothing at this point?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each service client will pass in its own retryfunc since the conditions for retrying are subtly different between endpoints, so this will take affect as clients are built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah ok - is it worth the constructor taking a RetryPolicy
(or rather an interface, which returns it) then?
func NewMsGraphClient(api environments.Api, apiVersion ApiVersion, tenantId string, retryConfiguration RetryConfiguration) (*Client, error) {
// ..
}
type RetryConfiguration interface {
RetryPolicy() []client.RequestRetryFunc
}
That'd allow us to offer some default retry policies, but also override that as needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that, although this would also need to be different per method. For example, the retry conditions for creating a service principal are different to getting a service principal. At the moment the RetryFuncs are stored in the Request object, with the client deciding whether or not to use them.
On failure to parse metadata, debug logs should contain the metadata response for troubleshooting purposes