You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RequestTimeout field on GlideClientConfiguration was recently updated to use a time.Duration to represent the timeout value. Prior to the change, the value was an int and documented to contain a value representing milliseconds. A time.Duration struct represents time as nanoseconds:
// A Duration represents the elapsed time between two instants// as an int64 nanosecond count. The representation limits the// largest representable duration to approximately 290 years.typeDurationint64const (
minDurationDuration=-1<<63maxDurationDuration=1<<63-1
)
The Duration value needs to be converted from nanoseconds to milliseconds in the toProtobuf implementation and should be validated in the WithRequestTimeout function to ensure it does not exceed the bounds of the uint32 type so the narrowing cast in toProtobuf does not result in an error.
Expected Behavior
RequestTimeout is expected to represent milliseconds in Glide-core. The time.Duration type should be appropriately constrained and converted to ensure proper operation.
Current Behavior
RequestTimeout value is improperly converted, and has undefined behavior for some Duration values.
Reproduction Steps
See description.
Possible Solution
No response
Additional Information/Context
No response
Client version used
2.0
Engine type and version
Any
OS
Any
Language
Go
Language Version
1.22
Cluster information
No response
Logs
No response
Other information
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
RequestTimeout field on GlideClientConfiguration was recently updated to use a
time.Duration
to represent the timeout value. Prior to the change, the value was an int and documented to contain a value representing milliseconds. Atime.Duration
struct represents time as nanoseconds:The
Duration
value needs to be converted from nanoseconds to milliseconds in thetoProtobuf
implementation and should be validated in theWithRequestTimeout
function to ensure it does not exceed the bounds of theuint32
type so the narrowing cast intoProtobuf
does not result in an error.Expected Behavior
RequestTimeout is expected to represent milliseconds in Glide-core. The time.Duration type should be appropriately constrained and converted to ensure proper operation.
Current Behavior
RequestTimeout value is improperly converted, and has undefined behavior for some
Duration
values.Reproduction Steps
See description.
Possible Solution
No response
Additional Information/Context
No response
Client version used
2.0
Engine type and version
Any
OS
Any
Language
Go
Language Version
1.22
Cluster information
No response
Logs
No response
Other information
No response
The text was updated successfully, but these errors were encountered: