Introduce ChainID type and several methods for interface #13

Merged
fyrchik merged 2 commits from aarifullin/policy-engine:feature/chain_interface into master 2023-11-01 07:44:40 +00:00
Collaborator
  • Introduce ChainID type for Chain. This type can be used only for local overrides.
  • Introduce methods for CachedChainStorage interface. It must be taken in count that the interface will be splitted and refactored soon
* Introduce ChainID type for Chain. This type can be used only for local overrides. * Introduce methods for `CachedChainStorage` interface. It must be taken in count that the interface will be splitted and refactored soon
aarifullin added the
enhancement
label 2023-10-30 23:07:31 +00:00
aarifullin requested review from fyrchik 2023-10-30 23:07:47 +00:00
aarifullin requested review from storage-core-developers 2023-10-30 23:07:47 +00:00
aarifullin requested review from storage-core-committers 2023-10-30 23:07:47 +00:00
aarifullin requested review from storage-services-committers 2023-10-30 23:07:55 +00:00
aarifullin requested review from storage-services-developers 2023-10-30 23:07:55 +00:00
aarifullin force-pushed feature/chain_interface from f81fb8b5b3 to 83314f185c 2023-10-30 23:08:49 +00:00 Compare
acid-ant approved these changes 2023-10-31 07:28:10 +00:00
aarifullin force-pushed feature/chain_interface from 83314f185c to 59648010b6 2023-10-31 07:43:19 +00:00 Compare
fyrchik reviewed 2023-10-31 08:18:31 +00:00
chain.go Outdated
@ -13,7 +13,13 @@ type Engine interface {
IsAllowed(name Name, namespace string, r Request) (Status, bool)
}
// ChainID is the ID of chain that is used for local overrides.

In contract we have ingress:somethingelse structure?
So how about using string as ID?
It can be generated by node.

In contract we have `ingress:somethingelse` structure? So how about using string as ID? It can be generated by node.
Poster
Collaborator

Alright, I don't mind

Alright, I don't mind
aarifullin force-pushed feature/chain_interface from 59648010b6 to f955e31c13 2023-10-31 10:19:35 +00:00 Compare
fyrchik reviewed 2023-10-31 10:22:36 +00:00
chain.go Outdated
@ -16,1 +17,4 @@
type ChainID string
type Chain struct {
// ID is applicable only for local overrides.

Actually, it is apllicable for contracts too: we may store multiple chains there.

Actually, it is apllicable for contracts too: we may store multiple chains there.
Poster
Collaborator

I meant ChainID is rather useful to manipulate local overrides because we need to pass it in frostfs-cli if we want to remove/get the chain info.

I haven't thought about the idea how it is can be used for the contract invocation. Anyway, let's keep the field and remove the comment

I meant ChainID is rather useful to manipulate local overrides because we need to pass it in `frostfs-cli` if we want to remove/get the chain info. I haven't thought about the idea how it is can be used for the contract invocation. Anyway, let's keep the field and remove the comment

@aarifullin Is my understanding correct: this PR is needed to do something sane in the frostfs-node and this PR will be later superceeded by #7 ?

@aarifullin Is my understanding correct: this PR is needed to do something sane in the frostfs-node and this PR will be later superceeded by https://git.frostfs.info/TrueCloudLab/policy-engine/issues/7 ?
Poster
Collaborator

@aarifullin Is my understanding correct: this PR is needed to do something sane in the frostfs-node and this PR will be later superceeded by #7 ?

That's absolutely right

> @aarifullin Is my understanding correct: this PR is needed to do something sane in the frostfs-node and this PR will be later superceeded by https://git.frostfs.info/TrueCloudLab/policy-engine/issues/7 ? That's absolutely right
aarifullin force-pushed feature/chain_interface from f955e31c13 to 76372aac04 2023-10-31 14:21:46 +00:00 Compare
aarifullin requested review from acid-ant 2023-10-31 15:23:54 +00:00
aarifullin requested review from storage-core-committers 2023-10-31 15:24:06 +00:00
dstepanov-yadro approved these changes 2023-10-31 16:46:18 +00:00
acid-ant approved these changes 2023-11-01 06:16:08 +00:00
fyrchik merged commit 76372aac04 into master 2023-11-01 07:44:40 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
No Milestone
No project
No Assignees
4 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/policy-engine#13
There is no content yet.