Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/Child objects ACL #543

Merged
merged 4 commits into from
Feb 22, 2024
Merged

fix/Child objects ACL #543

merged 4 commits into from
Feb 22, 2024

Conversation

carpawell
Copy link
Member

No description provided.

@carpawell carpawell self-assigned this Jan 12, 2024
@carpawell carpawell marked this pull request as draft January 12, 2024 02:26
object/object.go Outdated
}

// todo
func (o *Object) InitID() (v oid.ID, isSet bool) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest replacing isSet with error. Anyway, we return the second variable. The error is more informative and sometimes required to understand what it is

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree it can be improved somehow but suggest doing it all together (these flags are common to the Object)

@carpawell carpawell force-pushed the fix/small-objects-acl branch 2 times, most recently from db0231f to df4081c Compare February 9, 2024 17:14
My IDE says they are vulnerable:
- github.com/containerd/containerd v1.7.13
- github.com/opencontainers/runc v1.1.8

Signed-off-by: Pavel Karpy <[email protected]>
Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the fix/small-objects-acl branch from 2f08bda to c9eeaeb Compare February 14, 2024 20:42
@carpawell carpawell marked this pull request as ready for review February 14, 2024 20:43
Copy link
Contributor

@cthulhu-rider cthulhu-rider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall ok, slicer tests fail

@@ -39,7 +39,8 @@ func (s *SplitInfo) ToV2() *object.SplitInfo {
return (*object.SplitInfo)(s)
}

// SplitID returns [SplitID] if it has been set.
// SplitID returns [SplitID] if it has been set.New objects may miss it,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// SplitID returns [SplitID] if it has been set.New objects may miss it,
// SplitID returns [SplitID] if it has been set. New objects may miss it,

object/link.go Outdated
oid "github.com/nspcc-dev/neofs-sdk-go/object/id"
)

// Link represents a helper object with information about
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

object/link.go Outdated
// [Object.WriteLink]/[Object.ReadLink].
type Link v2object.Link

// WriteLink writes [Link] to the [Object], and sets its type to [TypeLink].
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[...] notations for prms are redundant: they all are links already (e.g. https://pkg.go.dev/github.com/nspcc-dev/[email protected]/object#Object.WriteLock)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dropped but i cannot understand why it is a problem. i literally copied the Lock docs (like from the link), what should your link say to me?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather have [Link], but if it's autodetected for these cases then it's not an error at least to not have brackets.

Includes the new LINK object (type and fixed payload) and the first object part
instead of split ID.

Signed-off-by: Pavel Karpy <[email protected]>
- Split ID is deprecated;
- First object part is a replacement for Split ID: every part should have its
ID, and also it has a root object header (without payload fields);
- Link object now stores child objects as a payload and has its own object type.

Signed-off-by: Pavel Karpy <[email protected]>
@carpawell carpawell force-pushed the fix/small-objects-acl branch from c9eeaeb to e1a82c5 Compare February 15, 2024 15:46
@carpawell
Copy link
Member Author

slicer tests fail

Fixed but #554 (comment). That was the reason i missed it.

@roman-khimov roman-khimov merged commit e292150 into master Feb 22, 2024
2 of 5 checks passed
@roman-khimov roman-khimov deleted the fix/small-objects-acl branch February 22, 2024 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants