Mistyped rgw adminops parameters
- Dominant language
- Go
- Stars
- 691
- Forks
- 296
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 11
Description
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.
Putting values other than `0` or `1` in the ints-as-booleans will result in the parameter being silently ignored (the return value of `RESTargs::get_bool` is ignored at all call sites):
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.