Bump reva to pull in the latest changes

This commit is contained in:
André Duffeck
2025-05-14 09:18:43 +02:00
parent 400fc0b4c2
commit 77aa702d23
9 changed files with 38 additions and 11 deletions

4
go.mod
View File

@@ -64,7 +64,7 @@ require (
github.com/onsi/gomega v1.37.0
github.com/open-policy-agent/opa v1.4.2
github.com/opencloud-eu/libre-graph-api-go v1.0.5
github.com/opencloud-eu/reva/v2 v2.32.0
github.com/opencloud-eu/reva/v2 v2.32.1-0.20250513152643-0acae98924b1
github.com/orcaman/concurrent-map v1.0.0
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.10
@@ -99,7 +99,7 @@ require (
golang.org/x/crypto v0.38.0
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
golang.org/x/image v0.27.0
golang.org/x/net v0.40.0
golang.org/x/net v0.39.0
golang.org/x/oauth2 v0.30.0
golang.org/x/sync v0.14.0
golang.org/x/term v0.32.0

8
go.sum
View File

@@ -862,8 +862,8 @@ github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-202505121527
github.com/opencloud-eu/go-micro-plugins/v4/store/nats-js-kv v0.0.0-20250512152754-23325793059a/go.mod h1:pjcozWijkNPbEtX5SIQaxEW/h8VAVZYTLx+70bmB3LY=
github.com/opencloud-eu/libre-graph-api-go v1.0.5 h1:Wv09oIjCF8zRN8roPzjXXo6ORp2h87/YhmdXE9N4p/A=
github.com/opencloud-eu/libre-graph-api-go v1.0.5/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.32.0 h1:JRWPleHiEl0film95Gkh1iBEhc6eikEsx5FKLfVx6l8=
github.com/opencloud-eu/reva/v2 v2.32.0/go.mod h1:FDhGVC+ZsRRWdC3am4EbuILBtviTbCDVrTUjFECOqvg=
github.com/opencloud-eu/reva/v2 v2.32.1-0.20250513152643-0acae98924b1 h1:ifRaV6y+bWp9mLuY34COPzM3he0y/vP4BvBhumvMcrY=
github.com/opencloud-eu/reva/v2 v2.32.1-0.20250513152643-0acae98924b1/go.mod h1:UvamLpqPDkEeGpcUQaaJwwV62Vo4AndHQBiMIPEzpuM=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
@@ -1322,8 +1322,8 @@ golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/net v0.40.0 h1:79Xs7wF06Gbdcg4kdCCIQArK11Z1hr5POQ6+fIYHNuY=
golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds=
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=

View File

@@ -31,6 +31,7 @@ type ContainerCreated struct {
SpaceOwner *user.UserId
Executant *user.UserId
Ref *provider.Reference
ParentID *provider.ResourceId
Owner *user.UserId
Timestamp *types.Timestamp
ImpersonatingUser *user.User
@@ -65,6 +66,7 @@ type FileTouched struct {
SpaceOwner *user.UserId
Executant *user.UserId
Ref *provider.Reference
ParentID *provider.ResourceId
Timestamp *types.Timestamp
ImpersonatingUser *user.User
}

View File

@@ -184,6 +184,7 @@ type UploadReady struct {
ExecutingUser *user.User
ImpersonatingUser *user.User
FileRef *provider.Reference
ParentID *provider.ResourceId
Timestamp *types.Timestamp
Failed bool
IsVersion bool

View File

@@ -521,11 +521,20 @@ func (t *Tree) assimilate(item scanItem) error {
// assimilate new file
newId := uuid.New().String()
fi, _, err := t.updateFile(item.Path, newId, spaceID, nil)
fi, attrs, err := t.updateFile(item.Path, newId, spaceID, nil)
if err != nil {
return err
}
var parentId *provider.ResourceId
if len(attrs[prefixes.ParentidAttr]) > 0 {
parentId = &provider.ResourceId{
StorageId: t.options.MountID,
SpaceId: spaceID,
OpaqueId: string(attrs[prefixes.ParentidAttr]),
}
}
ref := &provider.Reference{
ResourceId: &provider.ResourceId{
StorageId: t.options.MountID,
@@ -536,17 +545,20 @@ func (t *Tree) assimilate(item scanItem) error {
if fi.IsDir() {
t.PublishEvent(events.ContainerCreated{
Ref: ref,
ParentID: parentId,
Timestamp: utils.TSNow(),
})
} else {
if fi.Size() == 0 {
t.PublishEvent(events.FileTouched{
Ref: ref,
ParentID: parentId,
Timestamp: utils.TSNow(),
})
} else {
t.PublishEvent(events.UploadReady{
FileRef: ref,
ParentID: parentId,
Timestamp: utils.TSNow(),
})
}

View File

@@ -453,7 +453,8 @@ func (t *Tree) ListFolder(ctx context.Context, n *node.Node) ([]*node.Node, erro
child, err := node.ReadNode(ctx, t.lookup, n.SpaceID, nodeID, false, n.SpaceRoot, true)
if err != nil {
return err
t.log.Error().Err(err).Str("path", path).Msg("failed to read node")
continue
}
// prevent listing denied resources

View File

@@ -343,6 +343,7 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) {
}
now := time.Now()
var parentId *provider.ResourceId
if failed {
// if no other upload session is in progress (processing id != session id) or has finished (processing id == "")
latestSession, err := n.ProcessingID(ctx)
@@ -356,6 +357,11 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) {
}
}
} else if p := getParent(); p != nil {
parentId = &provider.ResourceId{
StorageId: session.ProviderID(),
SpaceId: session.SpaceID(),
OpaqueId: p.ID,
}
// update parent tmtime to propagate etag change after successful postprocessing
_ = p.SetTMTime(ctx, &now)
if err := fs.tp.Propagate(ctx, p, 0); err != nil {
@@ -389,6 +395,7 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) {
},
Path: utils.MakeRelativePath(filepath.Join(session.Dir(), session.Filename())),
},
ParentID: parentId,
Timestamp: utils.TimeToTS(now),
SpaceOwner: n.SpaceOwnerOrManager(ctx),
IsVersion: isVersion,

View File

@@ -129,7 +129,11 @@ func (fs *Decomposedfs) CreateStorageSpace(ctx context.Context, req *provider.Cr
}
// 770 permissions for the space
if err := os.MkdirAll(rootPath, 0770); err != nil {
if err := os.Mkdir(rootPath, 0770); err != nil {
if os.IsExist(err) {
// Someone has created the space in the meantime. Abort.
return nil, errtypes.AlreadyExists(spaceID)
}
return nil, errors.Wrap(err, fmt.Sprintf("Decomposedfs: error creating space %s", rootPath))
}

4
vendor/modules.txt vendored
View File

@@ -1202,7 +1202,7 @@ github.com/open-policy-agent/opa/v1/version
# github.com/opencloud-eu/libre-graph-api-go v1.0.5
## explicit; go 1.18
github.com/opencloud-eu/libre-graph-api-go
# github.com/opencloud-eu/reva/v2 v2.32.0
# github.com/opencloud-eu/reva/v2 v2.32.1-0.20250513152643-0acae98924b1
## explicit; go 1.24.1
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
github.com/opencloud-eu/reva/v2/cmd/revad/runtime
@@ -2168,7 +2168,7 @@ golang.org/x/image/vector
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
# golang.org/x/net v0.40.0
# golang.org/x/net v0.39.0
## explicit; go 1.23.0
golang.org/x/net/bpf
golang.org/x/net/context