mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-08 11:53:07 -04:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ca11e983e | ||
|
|
8ad66f5c35 | ||
|
|
a532da40dc | ||
|
|
5d23251b96 | ||
|
|
9502e00dc3 |
No files matched your search
+2
-2
@@ -405,7 +405,7 @@ config = {
|
||||
# NOTE: need to be updated if new production releases are determined
|
||||
"tags": ["2.0", "4.0"],
|
||||
# NOTE: need to be set to true if patch releases are made from stable-X-branches
|
||||
"skip_rolling": "false",
|
||||
"skip_rolling": False,
|
||||
"repo": docker_repo_slug,
|
||||
"build_type": "production",
|
||||
},
|
||||
@@ -1722,7 +1722,7 @@ def dockerReleases(ctx):
|
||||
docker_releases.append("rolling")
|
||||
|
||||
# on non tag events, do daily build
|
||||
else:
|
||||
elif config["dockerReleases"]["production"]["skip_rolling"]:
|
||||
docker_releases.append("daily")
|
||||
|
||||
for releaseConfigName in docker_releases:
|
||||
|
||||
@@ -64,7 +64,7 @@ require (
|
||||
github.com/open-policy-agent/opa v1.15.2
|
||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260609140739-8f745511cb37
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91
|
||||
github.com/opensearch-project/opensearch-go/v4 v4.6.0
|
||||
github.com/orcaman/concurrent-map v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
|
||||
@@ -948,8 +948,8 @@ github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89 h1:W1ms+l
|
||||
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89/go.mod h1:vigJkNss1N2QEceCuNw/ullDehncuJNFB6mEnzfq9UI=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d h1:JcqGDiyrcaQwVyV861TUyQgO7uEmsjkhfm7aQd84dOw=
|
||||
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260609140739-8f745511cb37 h1:QpDLacGIjn1N9o1tU/26DVxnB4SbuaK4MCnw86tXCOI=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260609140739-8f745511cb37/go.mod h1:RoFQt+u7edxwzHr1IZ2Y6VaDinMiRPQupAvMBy3WVmE=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91 h1:A/a0d9UNclpNBWGp2NUDWF+qO+U/u38EBH4CIk2dqIE=
|
||||
github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91/go.mod h1:RoFQt+u7edxwzHr1IZ2Y6VaDinMiRPQupAvMBy3WVmE=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4 h1:l2oB/RctH+t8r7QBj5p8thfEHCM/jF35aAY3WQ3hADI=
|
||||
github.com/opencloud-eu/secure v0.0.0-20260312082735-b6f5cb2244e4/go.mod h1:BmF5hyM6tXczk3MpQkFf1hpKSRqCyhqcbiQtiAF7+40=
|
||||
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
|
||||
|
||||
@@ -194,7 +194,7 @@ role_assignment:
|
||||
claim_value: mySpaceAdminRole
|
||||
- role_name: user
|
||||
claim_value: myUserRole
|
||||
- role_name: guest
|
||||
- role_name: user-light
|
||||
claim_value: myGuestRole
|
||||
```
|
||||
|
||||
@@ -223,7 +223,7 @@ The default `role_claim` (or `PROXY_ROLE_ASSIGNMENT_OIDC_CLAIM`) is `roles`. The
|
||||
claim_value: opencloudSpaceAdmin
|
||||
- role_name: user
|
||||
claim_value: opencloudUser
|
||||
- role_name: guest
|
||||
- role_name: user-light
|
||||
claim_value: opencloudcloudGuest
|
||||
```
|
||||
|
||||
|
||||
Generated
Vendored
+6
@@ -405,10 +405,13 @@ func SpaceUpdated(r *provider.UpdateStorageSpaceResponse, req *provider.UpdateSt
|
||||
|
||||
// SpaceEnabled converts the response to an event
|
||||
func SpaceEnabled(r *provider.UpdateStorageSpaceResponse, req *provider.UpdateStorageSpaceRequest, executant *user.User) events.SpaceEnabled {
|
||||
var grants map[string]provider.ResourcePermissions
|
||||
_ = utils.ReadJSONFromOpaque(r.GetOpaque(), "grants", &grants)
|
||||
return events.SpaceEnabled{
|
||||
Executant: executant.GetId(),
|
||||
ID: r.StorageSpace.Id,
|
||||
Owner: extractOwner(r.StorageSpace.Owner),
|
||||
Members: grants,
|
||||
Timestamp: utils.TSNow(),
|
||||
}
|
||||
}
|
||||
@@ -460,9 +463,12 @@ func SpaceUnshared(r *collaboration.RemoveShareResponse, req *collaboration.Remo
|
||||
|
||||
// SpaceDisabled converts the response to an event
|
||||
func SpaceDisabled(r *provider.DeleteStorageSpaceResponse, req *provider.DeleteStorageSpaceRequest, executant *user.User) events.SpaceDisabled {
|
||||
var grants map[string]provider.ResourcePermissions
|
||||
_ = utils.ReadJSONFromOpaque(r.GetOpaque(), "grants", &grants)
|
||||
return events.SpaceDisabled{
|
||||
Executant: executant.GetId(),
|
||||
ID: req.Id,
|
||||
Members: grants,
|
||||
Timestamp: time.Now(),
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+5
-4
@@ -169,11 +169,12 @@ func NewUnary(m map[string]interface{}) (grpc.UnaryServerInterceptor, int, error
|
||||
case *provider.UpdateStorageSpaceResponse:
|
||||
if isSuccess(v) {
|
||||
r := req.(*provider.UpdateStorageSpaceRequest)
|
||||
if r.StorageSpace.Name != "" {
|
||||
ev = SpaceRenamed(v, r, executant)
|
||||
} else if utils.ExistsInOpaque(r.Opaque, "restore") {
|
||||
switch {
|
||||
case utils.ExistsInOpaque(r.Opaque, "restore"):
|
||||
ev = SpaceEnabled(v, r, executant)
|
||||
} else {
|
||||
case r.StorageSpace.Name != "":
|
||||
ev = SpaceRenamed(v, r, executant)
|
||||
default:
|
||||
ev = SpaceUpdated(v, r, executant)
|
||||
}
|
||||
}
|
||||
|
||||
Generated
Vendored
+6
@@ -608,6 +608,12 @@ func (s *Service) UpdateStorageSpace(ctx context.Context, req *provider.UpdateSt
|
||||
return nil, err
|
||||
}
|
||||
s.addMissingStorageProviderID(res.GetStorageSpace().GetRoot(), res.GetStorageSpace().GetId())
|
||||
if res.Opaque == nil {
|
||||
res.Opaque = &typesv1beta1.Opaque{
|
||||
Map: map[string]*typesv1beta1.OpaqueEntry{},
|
||||
}
|
||||
}
|
||||
res.Opaque.Map["grants"] = res.StorageSpace.GetOpaque().GetMap()["grants"]
|
||||
return res, nil
|
||||
}
|
||||
|
||||
|
||||
+2
@@ -67,6 +67,7 @@ func (SpaceRenamed) Unmarshal(v []byte) (interface{}, error) {
|
||||
type SpaceDisabled struct {
|
||||
Executant *user.UserId
|
||||
ID *provider.StorageSpaceId
|
||||
Members map[string]provider.ResourcePermissions
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
||||
@@ -82,6 +83,7 @@ type SpaceEnabled struct {
|
||||
Executant *user.UserId
|
||||
ID *provider.StorageSpaceId
|
||||
Owner *user.UserId
|
||||
Members map[string]provider.ResourcePermissions
|
||||
Timestamp *types.Timestamp
|
||||
}
|
||||
|
||||
|
||||
+57
-1
@@ -32,6 +32,8 @@ import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/pkg/xattr"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/rs/zerolog"
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
@@ -54,6 +56,7 @@ import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/permissions"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/tree/propagator"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/usermapper"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/utils/templates"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/utils"
|
||||
)
|
||||
|
||||
@@ -177,14 +180,67 @@ func New(lu node.PathLookup, bs node.Blobstore, um usermapper.Mapper, trashbin *
|
||||
go t.workScanQueue()
|
||||
}
|
||||
if o.ScanFS {
|
||||
// warmup the cache for all space roots right away so clients and migrations don't get confused when starting with a cold cache
|
||||
err := t.warmupSpaceRootCache(o)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "error warming up space root cache")
|
||||
}
|
||||
|
||||
// scan the whole tree asynchronously to pick up new nodes
|
||||
go func() {
|
||||
_ = t.WarmupIDCache(o.Root, true, false)
|
||||
start := time.Now()
|
||||
err := t.WarmupIDCache(o.Root, true, false)
|
||||
if err != nil {
|
||||
t.log.Error().Err(err).Msg("error during initial fs scan")
|
||||
}
|
||||
duration := time.Since(start)
|
||||
|
||||
scanDurationGauge := promauto.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "reva_fs_scan_duration_seconds",
|
||||
Help: "Duration of the initial filesystem scan in seconds",
|
||||
})
|
||||
scanDurationGauge.Set(duration.Seconds())
|
||||
t.log.Info().Dur("duration", duration).Msg("initial fs scan finished")
|
||||
}()
|
||||
}
|
||||
|
||||
return t, nil
|
||||
}
|
||||
|
||||
func (t *Tree) warmupSpaceRootCache(options *options.Options) error {
|
||||
personalRoot := filepath.Clean(filepath.Join(options.Root, templates.Base(options.PersonalSpacePathTemplate)))
|
||||
projectRoot := filepath.Clean(filepath.Join(options.Root, templates.Base(options.GeneralSpacePathTemplate)))
|
||||
|
||||
var paths []string
|
||||
personalEntries, err := os.ReadDir(personalRoot)
|
||||
if err != nil && !errors.Is(err, fs.ErrNotExist) {
|
||||
return errors.Wrap(err, "could not read personal space root directory")
|
||||
}
|
||||
for _, entry := range personalEntries {
|
||||
paths = append(paths, filepath.Join(personalRoot, entry.Name()))
|
||||
}
|
||||
projectEntries, err := os.ReadDir(projectRoot)
|
||||
if err != nil && !errors.Is(err, fs.ErrNotExist) {
|
||||
return errors.Wrap(err, "could not read project space root directory")
|
||||
}
|
||||
for _, entry := range projectEntries {
|
||||
paths = append(paths, filepath.Join(projectRoot, entry.Name()))
|
||||
}
|
||||
|
||||
for _, path := range paths {
|
||||
spaceID, _, _, _, err := t.lookup.MetadataBackend().IdentifyPath(context.TODO(), path)
|
||||
if err != nil {
|
||||
t.log.Error().Err(err).Str("path", path).Msg("could not identify space root path")
|
||||
continue
|
||||
}
|
||||
err = t.idCache.Set(context.TODO(), spaceID, spaceID, path)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not cache space root path")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (t *Tree) checkStorage() error {
|
||||
// check if the root path is a directory
|
||||
err := os.MkdirAll(t.options.Root, 0700)
|
||||
|
||||
Vendored
+1
-1
@@ -1360,7 +1360,7 @@ github.com/opencloud-eu/icap-client
|
||||
# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20260310090739-853d972b282d
|
||||
## explicit; go 1.18
|
||||
github.com/opencloud-eu/libre-graph-api-go
|
||||
# github.com/opencloud-eu/reva/v2 v2.46.3-0.20260609140739-8f745511cb37
|
||||
# github.com/opencloud-eu/reva/v2 v2.46.3-0.20260610093751-a33d8108dd91
|
||||
## explicit; go 1.25.0
|
||||
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
|
||||
github.com/opencloud-eu/reva/v2/cmd/revad/runtime
|
||||
|
||||
Reference in new issue
Block a user