Closed MichaelEischer closed 9 months ago
Hey @vicentepinto98 was this issue accidentally reopened?
@nschad no, I reopened it because I will create new SDK releases that will include the bugfix. After that I will close the issue.
The fix was included in the latest core
release v0.7.7
All of the other SDK modules were also updated to use the latest core
A stackit client that uses one of the authentication flows internally calls
clients.Do
to process anhttp.Request
. The latter function creates its context based oncontext.Background()
instead of the (optional) context attached to thehttp.Request
.https://github.com/stackitcloud/stackit-sdk-go/blob/3d0348c731616793d1989fcb498e5689b4344c12/core/clients/clients.go#L60
That behavior is problematic if the http.Request contains a context with a short timeout of for example only a few seconds. Due to the use of
context.Background()
that timeout is ignored resulting in exceeded deadlines.Do
should instead honor the passed in context.