Adding API for getting chains by chain_id #1195

Open
opened 2024-06-24 10:17:00 +00:00 by r.loginov · 4 comments
Member

At the moment, the only way to scroll through the created chains is to know the target values (ListChainLocalOverrides and GetChainLocalOverride). There are applications that do not track the content of the target, but use well-known chain_id to identify their rules.

Describe the solution you'd like

It would be great if an API appeared that would either allow you to get all the chains by chain_id, or just get all the chains that would be grouped by target type and target value.

## Is your feature request related to a problem? Please describe. At the moment, the only way to scroll through the created chains is to know the target values ([ListChainLocalOverrides](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/services/control/service.proto#L68) and [GetChainLocalOverride](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/services/control/service.proto#L63)). There are applications that do not track the content of the target, but use well-known chain_id to identify their rules. ## Describe the solution you'd like It would be great if an API appeared that would either allow you to get all the chains by chain_id, or just get all the chains that would be grouped by target type and target value.
r.loginov added the
triage
label 2024-06-24 10:17:00 +00:00
fyrchik added the
frostfs-node
label 2024-06-24 10:47:05 +00:00
Owner

@aarifullin do we allow using same chain_id for chains in different targets?

@aarifullin do we allow using same chain_id for chains in different targets?
Member

@aarifullin do we allow using same chain_id for chains in different targets?

Yes, as far as I remember - we agreed about that.

> @aarifullin do we allow using same chain_id for chains in different targets? Yes, as far as I remember - we agreed about that.
Member

I presume we need to slightly change schema for list method making Chain target as optional (if no definite target is set - list all chains for all targets) and introducing filter chain_id that can be used with wildcard chainNameB*. The result should be grouped by targets

BTW, searching for a chain with a certain chain id is real but this requires 3 steps. @r.loginov would like to have one-run request to find a chain

I presume we need to slightly change schema for [list method](https://git.frostfs.info/TrueCloudLab/frostfs-node/src/branch/master/pkg/services/control/service.proto#L562-L583) making `Chain target` as `optional` (if no definite target is set - list all chains for all targets) and introducing filter `chain_id` that can be used with wildcard `chainNameB*`. The result should be grouped by targets BTW, searching for a chain with a certain chain id is real but this requires 3 steps. @r.loginov would like to have one-run request to find a chain
Owner

making Chain target as optional

in protobuf 3 all fields are optional, there is no need to change schema because of this

However, we return only chain, not the chain target, so we might want to change the response.

>making Chain target as optional in protobuf 3 all fields are optional, there is no need to change schema because of this However, we return only chain, not the chain target, so we might want to change the response.
aarifullin self-assigned this 2024-06-24 13:45:26 +00:00
aarifullin was unassigned by fyrchik 2024-08-09 06:25:03 +00:00
fyrchik removed the
triage
label 2024-10-02 06:27:07 +00:00
fyrchik added this to the vNext milestone 2024-10-02 06:27:14 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
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-node#1195
No description provided.