control: Recieve target in gRPC methods for APE managing #842

Merged
fyrchik merged 2 commits from aarifullin/frostfs-node:feature/chain_control_api into master 2023-12-07 14:22:00 +00:00
Member
  • Introduce Target type and pass it to all gRPC methods
    for APE chain managing instead CID
  • Update policy-engine package version in go.mod, go.sum.
  • Refactor CheckIfRequestPermitted: pass container target
    instead container ID.
* Introduce Target type and pass it to all gRPC methods for APE chain managing instead CID * Update policy-engine package version in go.mod, go.sum. * Refactor CheckIfRequestPermitted: pass container target instead container ID.
aarifullin added the
refactoring
label 2023-12-05 09:16:28 +00:00
aarifullin force-pushed feature/chain_control_api from 1f2e3e067f to 9af58a9b31 2023-12-05 09:17:27 +00:00 Compare
aarifullin changed title from [#XX] control: Recieve target in gRPC methods for APE managing to control: Recieve target in gRPC methods for APE managing 2023-12-05 09:18:26 +00:00
aarifullin requested review from storage-core-committers 2023-12-05 10:31:50 +00:00
aarifullin requested review from storage-core-developers 2023-12-05 10:32:02 +00:00
acid-ant approved these changes 2023-12-05 10:33:45 +00:00
elebedeva approved these changes 2023-12-05 13:50:56 +00:00
dkirillov reviewed 2023-12-06 08:53:41 +00:00
@ -22,2 +42,2 @@
var cid cid.ID
err := cid.Decode(req.GetBody().GetContainerId())
target := req.GetBody().GetTarget()
if target.Type != control.ChainTarget_CONTAINER {
Member

Why do we require exactly container target (what about namespace)?

Why do we require exactly container target (what about namespace)?
Author
Member

As you can see here is deprecated prototype of APE used. This check will be fixe here but we need this PR #842 first.

Briefly: the current implementation works with containers only but this will become unactual in #820

As you can see here is deprecated prototype of APE used. This check will be fixe [here](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/820) but we need this PR #842 first. Briefly: the current implementation works with containers only but this will become unactual in #820
aarifullin force-pushed feature/chain_control_api from 7ab1921c6a to f7575437f8 2023-12-06 12:29:39 +00:00 Compare
aarifullin requested review from acid-ant 2023-12-06 12:30:50 +00:00
aarifullin requested review from elebedeva 2023-12-06 12:30:50 +00:00
aarifullin requested review from storage-core-committers 2023-12-06 12:31:03 +00:00
aarifullin requested review from storage-core-developers 2023-12-06 12:31:04 +00:00
dkirillov approved these changes 2023-12-06 13:50:52 +00:00
acid-ant approved these changes 2023-12-07 06:45:29 +00:00
fyrchik reviewed 2023-12-07 07:26:03 +00:00
@ -15,2 +16,4 @@
)
// extractCID extracts CID from the schema's pattern.
// TODO (aarifullin): This is temporary solution should be replaced by
Owner

Do we have a task for this? Refs #847 @dstepanov-yadro

Do we have a task for this? Refs #847 @dstepanov-yadro
Author
Member

I am going to erase this method and TODO here. So, as soon as this PR will be merged!

This method is needed because frostfs-node still uses deprecated APE version

I am going to erase this method and `TODO` [here](https://git.frostfs.info/TrueCloudLab/frostfs-node/pulls/820). So, as soon as this PR will be merged! This method is needed because frostfs-node still uses deprecated APE version
fyrchik marked this conversation as resolved
@ -172,0 +175,4 @@
// are applied.
message ChainTarget {
enum TargetType {
NAMESPACE = 0;
Owner

Maybe use some undefined as default = 0? The parameter is mandatory

Maybe use some `undefined` as default `= 0`? The parameter is mandatory
Author
Member

Introduced Undefined number

Introduced `Undefined` number
fyrchik marked this conversation as resolved
aarifullin force-pushed feature/chain_control_api from f7575437f8 to ec747c217c 2023-12-07 10:18:22 +00:00 Compare
aarifullin requested review from acid-ant 2023-12-07 10:22:58 +00:00
aarifullin requested review from dkirillov 2023-12-07 10:22:58 +00:00
acid-ant approved these changes 2023-12-07 11:01:03 +00:00
fyrchik approved these changes 2023-12-07 11:08:39 +00:00
dkirillov approved these changes 2023-12-07 11:33:21 +00:00
elebedeva approved these changes 2023-12-07 13:09:52 +00:00
fyrchik merged commit e361e017f3 into master 2023-12-07 14:22:00 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
5 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#842
No description provided.