-
Notifications
You must be signed in to change notification settings - Fork 294
Description
Description
When the Rust SDK changes, it’s hard to ensure other SDKs stay fully aligned. Some requests send by these SDKs may miss attributes, and some fields in response maybe ignored by them.
Component
None
Proposed solution
We should develop a small Rust utility that uses the production SDK to generate "Baseline Files" for every message type (e.g., poll_messages request, poll_message response, get_user request, get_user response, etc). For each message type, it will output:
.bin: The "correct" serialized binary representation.
.json: The human-readable structured data representing that message.
Each SDK implementation (Go, Python, etc.) will integrate a specific test suite that performs the following:
For response, read the .bin file, deserialize it, compre with .json.
For request, read the the .json file, serialize it, compare with .bin file.
If this is in our CI, we can make sure that the SDK other than rust can be forced to always align with rust SDK.
Alternatives considered
Looking for some feedback since this doesn't seems to be a perfect approach. And I am not sure if this approach is doable for every SDK.