generated from TrueCloudLab/basic
chain: Refactor ObjectType type #75
No reviewers
TrueCloudLab/storage-core-developers
TrueCloudLab/storage-services-committers
TrueCloudLab/storage-services-developers
Labels
No labels
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/policy-engine#75
Loading…
Reference in a new issue
No description provided.
Delete branch "aarifullin/policy-engine:fix/refactor_cnr_obj_type"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Probably,
ObjectType
was mistaken for frostfs object types, but actually policy-engine knows (or should know) nothing about container and objects (the exception is schema constants).ObjectType
toKind
;Object
field inCondition
toConditionKind
;ContainerResource
,ContainerRequest
constants as theyshould not be used at all;
@ -71,1 +70,4 @@
Op ConditionType
// Object specifies for which data this condition will be applied to (Resource, Request).
// Object should be not confused with the same name entity from FrostFS.
Object ObjectType
It definitely causes confusion. What about renaming it to
Kind
?The type should also be named
Kind
and constantsKindResource
,KindRequest
.Yeah,
Kind
really sounds good 👍But this breaks backward compatibility - "old" chains with
Object
won't be parsedWhy, though? The binary format is unchanged, besides removed items, which is unrelated to naming.
Btw if removing these constant breaks backward-compatibility with v0.38.4 version of node, we shouldn't do it.
Breaking compatibility in frostfs-cli is fine, though.
8459fe38d1
tof859839a7d
f859839a7d
to7b876453ac
chain: Factor out condition object types for containerto chain: Refactor ObjectType type7b876453ac
todbf41eb77f
dbf41eb77f
to43f1ac9851
@ -73,2 +71,2 @@
Key string
Value string
Op ConditionType
ConditionKind ConditionKindType
It is ok for a type name, but why do we use
Condition
prefix in the field name? It leads toCondition.ConditionKind
full name and some verbosity in JSON format.Also,
Kind
is somewhat synonymous withType
.So what about
Kind ConditionKind
?Your point is absolutely fair but the point is that we've got similar names throuought:
type Kind byte
(this is explanation for the rest of reviewers who didn't get the point of this renaming yet)
But I agreed that
Condition.ConditionKind
really looks ugly. Let's try the solution suggested by you 'Kind ConditionKind`UPD: Renamed to
Kind ConditionKind
43f1ac9851
to84c4872b20