Bump reva

This commit is contained in:
André Duffeck
2025-03-19 12:23:28 +01:00
parent 255f45034a
commit 1f7ce9818d
8 changed files with 29 additions and 19 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ require (
github.com/onsi/ginkgo/v2 v2.23.0
github.com/onsi/gomega v1.36.2
github.com/open-policy-agent/opa v1.2.0
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318095448-45dd4836c008
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318145617-dd5b9b6fb606
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20240829135935-80dc00d6f5ea
github.com/pkg/errors v0.9.1
+2 -2
View File
@@ -861,8 +861,8 @@ github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
github.com/open-policy-agent/opa v1.2.0 h1:88NDVCM0of1eO6Z4AFeL3utTEtMuwloFmWWU7dRV1z0=
github.com/open-policy-agent/opa v1.2.0/go.mod h1:30euUmOvuBoebRCcJ7DMF42bRBOPznvt0ACUMYDUGVY=
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318095448-45dd4836c008 h1:jQCe5/m4tK6q0vJwKl+6NcqA33O+j/rroCms5kugGTM=
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318095448-45dd4836c008/go.mod h1:XWp81Uok1opSID0HeITjvxJqdorltHVx+iJv4IlWzPo=
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318145617-dd5b9b6fb606 h1:ASUV6F7hHgar1RrnPfTQhtd+/KMeTCn7LhLzda0+HKY=
github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318145617-dd5b9b6fb606/go.mod h1:XWp81Uok1opSID0HeITjvxJqdorltHVx+iJv4IlWzPo=
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=
@@ -75,10 +75,6 @@ func (c *Config) Init() {
c.ProductVersion = "10.0.11"
}
if c.Edition == "" {
c.Edition = "community"
}
if c.NameValidation.InvalidChars == nil {
c.NameValidation.InvalidChars = []string{"\f", "\r", "\n", "\\"}
}
@@ -70,7 +70,7 @@ func (h *Handler) Init(c *config.Config) {
h.c.Capabilities.Core.Status.VersionString = "10.0.11" // TODO make build determined
}
if h.c.Capabilities.Core.Status.Edition == "" {
h.c.Capabilities.Core.Status.Edition = "community" // TODO make build determined
h.c.Capabilities.Core.Status.Edition = "" // TODO make build determined
}
if h.c.Capabilities.Core.Status.ProductName == "" {
h.c.Capabilities.Core.Status.ProductName = "reva" // TODO make build determined
@@ -220,7 +220,7 @@ func (h *Handler) Init(c *config.Config) {
Minor: 0,
Micro: 11,
String: "10.0.11",
Edition: "community",
Edition: "",
Product: "reva",
ProductVersion: "",
}
@@ -406,6 +406,14 @@ func (lu *Lookup) GenerateSpaceID(spaceType string, owner *user.User) (string, e
}
}
func (lu *Lookup) PurgeNode(n *node.Node) error {
rerr := os.RemoveAll(n.InternalPath())
if cerr := lu.IDCache.Delete(context.Background(), n.SpaceID, n.ID); cerr != nil {
return cerr
}
return rerr
}
// TimeManager returns the time manager
func (lu *Lookup) TimeManager() node.TimeManager {
return lu.tm
@@ -34,6 +34,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata/prefixes"
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/node"
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/options"
"github.com/opencloud-eu/reva/v2/pkg/utils"
"github.com/pkg/errors"
"github.com/rogpeppe/go-internal/lockedfile"
"go.opentelemetry.io/otel"
@@ -349,6 +350,17 @@ func (lu *Lookup) CopyMetadataWithSourceLock(ctx context.Context, sourceNode, ta
return lu.MetadataBackend().SetMultiple(ctx, targetNode, newAttrs, acquireTargetLock)
}
func (lu *Lookup) PurgeNode(n *node.Node) error {
// remove node
if err := utils.RemoveItem(n.InternalPath()); err != nil {
return err
}
// remove child entry in parent
src := filepath.Join(n.ParentPath(), n.Name)
return os.Remove(src)
}
// TimeManager returns the time manager
func (lu *Lookup) TimeManager() node.TimeManager {
return lu.tm
@@ -29,7 +29,6 @@ import (
"hash/adler32"
"io"
"os"
"path/filepath"
"strconv"
"strings"
"time"
@@ -165,6 +164,8 @@ type PathLookup interface {
ReadBlobIDAndSizeAttr(ctx context.Context, n metadata.MetadataNode, attrs Attributes) (string, int64, error)
CopyMetadataWithSourceLock(ctx context.Context, sourceNode, targetNode metadata.MetadataNode, filter func(attributeName string, value []byte) (newValue []byte, copy bool), lockedSource *lockedfile.File, acquireTargetLock bool) (err error)
CopyMetadata(ctx context.Context, sourceNode, targetNode metadata.MetadataNode, filter func(attributeName string, value []byte) (newValue []byte, copy bool), acquireTargetLock bool) (err error)
PurgeNode(n *Node) error
}
type IDCacher interface {
@@ -1195,14 +1196,7 @@ func (n *Node) DeleteGrant(ctx context.Context, g *provider.Grant, acquireLock b
// Purge removes a node from disk. It does not move it to the trash
func (n *Node) Purge(ctx context.Context) error {
// remove node
if err := utils.RemoveItem(n.InternalPath()); err != nil {
return err
}
// remove child entry in parent
src := filepath.Join(n.ParentPath(), n.Name)
return os.Remove(src)
return n.lu.PurgeNode(n)
}
// ListGrants lists all grants of the current node.
+1 -1
View File
@@ -1191,7 +1191,7 @@ github.com/open-policy-agent/opa/v1/types
github.com/open-policy-agent/opa/v1/util
github.com/open-policy-agent/opa/v1/util/decoding
github.com/open-policy-agent/opa/v1/version
# github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318095448-45dd4836c008
# github.com/opencloud-eu/reva/v2 v2.28.1-0.20250318145617-dd5b9b6fb606
## explicit; go 1.24.1
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
github.com/opencloud-eu/reva/v2/cmd/revad/runtime