chore: bump reva to 56879111e06afa9e8c04ee71409548531cda7d76

This commit is contained in:
Benedikt Kulmann
2024-05-28 08:43:33 +02:00
parent 6bf39e4ef9
commit 6bd73e6261
7 changed files with 54 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ Enhancement: Bump Reva
bumps reva version
https://github.com/owncloud/ocis/pull/9269
https://github.com/owncloud/ocis/pull/9236
https://github.com/owncloud/ocis/pull/9188
https://github.com/owncloud/ocis/pull/9132

2
go.mod
View File

@@ -15,7 +15,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.10.0
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781
github.com/cs3org/reva/v2 v2.19.2-0.20240522140613-fae5c105158f
github.com/cs3org/reva/v2 v2.19.2-0.20240525160759-56879111e06a
github.com/dhowden/tag v0.0.0-20230630033851-978a0926ee25
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1

4
go.sum
View File

@@ -1027,6 +1027,10 @@ github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781 h1:BUdwkIlf8IS2F
github.com/cs3org/go-cs3apis v0.0.0-20231023073225-7748710e0781/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva/v2 v2.19.2-0.20240522140613-fae5c105158f h1:gQNgViSZs4DogTJNQ7yiWGPS+HbYwhccSw6OjYQYxlk=
github.com/cs3org/reva/v2 v2.19.2-0.20240522140613-fae5c105158f/go.mod h1:BOlJApKFrWRiaOoBCRxCTG5bghTTMlYaEZrRxOzKaS8=
github.com/cs3org/reva/v2 v2.19.2-0.20240525160759-56879111e06a h1:Xv2TmFIxhk642vN3NO03XSZl9NO0TVy7/QAC0CUiySc=
github.com/cs3org/reva/v2 v2.19.2-0.20240525160759-56879111e06a/go.mod h1:BOlJApKFrWRiaOoBCRxCTG5bghTTMlYaEZrRxOzKaS8=
github.com/cs3org/reva/v2 v2.19.7 h1:0hMIbCZq1VBSxAslEvDDkj1Si8RqxbxR0wx3JvIRXTE=
github.com/cs3org/reva/v2 v2.19.7/go.mod h1:GRUrOp5HbFVwZTgR9bVrMZ/MvVy+Jhxw1PdMmhhKP9E=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=

View File

@@ -52,6 +52,7 @@ import (
"github.com/cs3org/reva/v2/pkg/rhttp/router"
"github.com/cs3org/reva/v2/pkg/storagespace"
"github.com/cs3org/reva/v2/pkg/utils"
"github.com/iancoleman/strcase"
"github.com/rs/zerolog"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
@@ -1147,18 +1148,18 @@ func mdToPropResponse(ctx context.Context, pf *XML, md *provider.ResourceInfo, p
appendMetadataProp := func(metadata map[string]string, tagNamespace string, name string, metadataPrefix string, keys []string) {
content := strings.Builder{}
for _, key := range keys {
lowerCaseKey := strings.ToLower(key)
kebabCaseKey := strcase.ToKebab(key)
if v, ok := metadata[fmt.Sprintf("%s.%s", metadataPrefix, key)]; ok {
content.WriteString("<")
content.WriteString(tagNamespace)
content.WriteString(":")
content.WriteString(lowerCaseKey)
content.WriteString(kebabCaseKey)
content.WriteString(">")
content.Write(prop.Escaped("", v).InnerXML)
content.WriteString("</")
content.WriteString(tagNamespace)
content.WriteString(":")
content.WriteString(lowerCaseKey)
content.WriteString(kebabCaseKey)
content.WriteString(">")
}
}

View File

@@ -24,6 +24,7 @@ import (
"io"
"os"
"path/filepath"
"strings"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/lookup"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node"
@@ -109,6 +110,30 @@ func (bs *Blobstore) Delete(node *node.Node) error {
return nil
}
// List lists all blobs in the Blobstore
func (bs *Blobstore) List() ([]string, error) {
dirs, err := filepath.Glob(filepath.Join(bs.root, "spaces", "*", "*", "blobs", "*", "*", "*", "*", "*"))
if err != nil {
return nil, err
}
blobids := make([]string, 0, len(dirs))
for _, d := range dirs {
seps := strings.Split(d, "/")
var b string
var now bool
for _, s := range seps {
if now {
b += s
}
if s == "blobs" {
now = true
}
}
blobids = append(blobids, b)
}
return blobids, nil
}
func (bs *Blobstore) path(node *node.Node) (string, error) {
if node.BlobID == "" {
return "", fmt.Errorf("blobstore: BlobID is empty")

View File

@@ -25,6 +25,7 @@ import (
"net/url"
"os"
"path/filepath"
"strings"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/lookup"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node"
@@ -127,6 +128,23 @@ func (bs *Blobstore) Delete(node *node.Node) error {
return nil
}
// List lists all blobs in the Blobstore
func (bs *Blobstore) List() ([]string, error) {
ch := bs.client.ListObjects(context.Background(), bs.bucket, minio.ListObjectsOptions{Recursive: true})
var err error
ids := make([]string, 0)
for oi := range ch {
if oi.Err != nil {
err = oi.Err
continue
}
_, blobid, _ := strings.Cut(oi.Key, "/")
ids = append(ids, strings.ReplaceAll(blobid, "/", ""))
}
return ids, err
}
func (bs *Blobstore) path(node *node.Node) string {
// https://aws.amazon.com/de/premiumsupport/knowledge-center/s3-prefix-nested-folders-difference/
// Prefixes are used to partion a bucket. A prefix is everything except the filename.

2
vendor/modules.txt vendored
View File

@@ -366,7 +366,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
# github.com/cs3org/reva/v2 v2.19.2-0.20240522140613-fae5c105158f
# github.com/cs3org/reva/v2 v2.19.2-0.20240525160759-56879111e06a
## explicit; go 1.21
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime