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
If found the following typing errors/inconsistencies in the adminops interface:
The fields User.Supended and User.PurgeData are type *int while the API interprets them as booleans (other booleans are typed *bool).
The integer parameters QuotaSpec.MaxSizeKb and User.MaxBuckets are mistyped as *int, while they are int64 resp. int32 on the rgw side. The width *int in will depend on the architecture in go. (Note: It is unclear how this works when the values are returned as json – technically all numbers in json are double floats, so int64 can not be represented faithfully – unless the serializer/deserializer both ignore this when serializing/deserializing according to a schema).
Of course, fixing those issues would break any code referencing those fields (as their types would change). So it will have to decided what is more important – stability of the library or consistency with the RGW adminops API.
Independently of the decision this matter should be well documented.
If found the following typing errors/inconsistencies in the adminops interface:
The fields
User.Supended
andUser.PurgeData
are type*int
while the API interprets them as booleans (other booleans are typed*bool
).The integer parameters
QuotaSpec.MaxSizeKb
andUser.MaxBuckets
are mistyped as*int
, while they areint64
resp.int32
on the rgw side. The width*int
in will depend on the architecture in go. (Note: It is unclear how this works when the values are returned as json – technically all numbers in json are double floats, so int64 can not be represented faithfully – unless the serializer/deserializer both ignore this when serializing/deserializing according to a schema).Of course, fixing those issues would break any code referencing those fields (as their types would change). So it will have to decided what is more important – stability of the library or consistency with the RGW adminops API.
Independently of the decision this matter should be well documented.
Putting values other than
0
or1
in the ints-as-booleans will result in the parameter being silently ignored (the return value ofRESTargs::get_bool
is ignored at all call sites): https://github.com/ceph/ceph/blob/193895ffba4245787a2f50bbd5b80132f0e76e74/src/rgw/rgw_rest.cc#L957The text was updated successfully, but these errors were encountered: