Make SDK more tolerant for new network info parameters #232

Closed
opened 2024-06-26 14:27:10 +00:00 by dkirillov · 0 comments
Member

Recently new network config params were added (e.g. MaxECDataCount). This value can be nil (that means 0) and old SDK revisions starts get error:

invalid network info field in the response: empty attribute value MaxECDataCount

The following code there is in new SDK revisions.
So we explicitly allow specific set of params that can be empty. If we add one more such parameter in the future client application must update SDK to support this. It seems like breaking changes though we just add new param.

Describe the solution you'd like

Probably we can allow empty values for any config params by default and explicitly check which must not contain nil value.

Describe alternatives you've considered

Keep the following scheme

Additional context

No

cc @fyrchik @alexvanin

## Is your feature request related to a problem? Please describe. Recently new network config params were added (e.g. `MaxECDataCount`). This value can be `nil` (that means `0`) and old SDK revisions starts get error: ``` invalid network info field in the response: empty attribute value MaxECDataCount ``` [The following code](https://git.frostfs.info/TrueCloudLab/frostfs-sdk-go/src/commit/1a5886e776de79fc6598838242e4dc7ff21e7bea/netmap/network_info.go#L51-L72) there is in new SDK revisions. So we explicitly allow specific set of params that can be empty. If we add one more such parameter in the future client application **must** update SDK to support this. It seems like breaking changes though we just add new param. ## Describe the solution you'd like Probably we can allow empty values for any config params by default and explicitly check which must not contain `nil` value. ## Describe alternatives you've considered Keep the following scheme ## Additional context No cc @fyrchik @alexvanin
achuprov was assigned by fyrchik 2024-06-27 06:50:40 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#232
No description provided.