mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-08 19:58:46 -04:00
Compare commits
9
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dcb7a1ff2 | ||
|
|
63664db2f6 | ||
|
|
f8e26d3198 | ||
|
|
a6ca2c538e | ||
|
|
56e03f12ce | ||
|
|
8ad66f5c35 | ||
|
|
a532da40dc | ||
|
|
5d23251b96 | ||
|
|
9502e00dc3 |
No files matched your search
+2
-2
@@ -1,4 +1,4 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=2cee98bb27fab223fc4ce2455f5483ce7767ff1a
|
||||
WEB_BRANCH=main
|
||||
WEB_COMMITID=52b146f5356211e618ae26bfe39aed2feeec2d27
|
||||
WEB_BRANCH=stable-7.1
|
||||
|
||||
+7
-5
@@ -75,11 +75,11 @@ OC_FED_DOMAIN = "%s:10200" % FED_OC_SERVER_NAME
|
||||
event = {
|
||||
"base": {
|
||||
"event": ["push", "manual"],
|
||||
"branch": "main",
|
||||
"branch": "stable-*",
|
||||
},
|
||||
"cron": {
|
||||
"event": "cron",
|
||||
"branch": "main",
|
||||
"branch": "stable-*",
|
||||
},
|
||||
"pull_request": {
|
||||
"event": "pull_request",
|
||||
@@ -403,9 +403,10 @@ config = {
|
||||
"architectures": ["arm64", "amd64"],
|
||||
"production": {
|
||||
# NOTE: need to be updated if new production releases are determined
|
||||
"tags": ["2.0", "4.0"],
|
||||
"tags": ["2.0", "4.0", "7.2"],
|
||||
# NOTE: need to be set to true if patch releases are made from stable-X-branches
|
||||
"skip_rolling": "false",
|
||||
"skip_rolling": True,
|
||||
"skip_daily": True,
|
||||
"repo": docker_repo_slug,
|
||||
"build_type": "production",
|
||||
},
|
||||
@@ -1722,7 +1723,7 @@ def dockerReleases(ctx):
|
||||
docker_releases.append("rolling")
|
||||
|
||||
# on non tag events, do daily build
|
||||
else:
|
||||
elif not config["dockerReleases"]["production"]["skip_daily"]:
|
||||
docker_releases.append("daily")
|
||||
|
||||
for releaseConfigName in docker_releases:
|
||||
@@ -2084,6 +2085,7 @@ def readyReleaseGo():
|
||||
"image": READY_RELEASE_GO,
|
||||
"settings": {
|
||||
"git_email": "devops@opencloud.eu",
|
||||
"release_branch": "stable-7.2",
|
||||
"forge_type": "github",
|
||||
"forge_token": {
|
||||
"from_secret": "github_token",
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -34,7 +34,7 @@ var (
|
||||
// LatestTag is the latest released version plus the dev meta version.
|
||||
// Will be overwritten by the release pipeline
|
||||
// Needs a manual change for every tagged release
|
||||
LatestTag = "7.1.0+dev"
|
||||
LatestTag = "7.2.0-rc.1+dev"
|
||||
|
||||
// Date indicates the build date.
|
||||
// This has been removed, it looks like you can only replace static strings with recent go versions
|
||||
|
||||
@@ -63,8 +63,6 @@ type Config struct {
|
||||
|
||||
Groupware Groupware `yaml:"groupware"`
|
||||
|
||||
OpenXchange OpenXchange `yaml:"open_xchange"`
|
||||
|
||||
Context context.Context `yaml:"-"`
|
||||
}
|
||||
|
||||
@@ -225,8 +223,3 @@ type PasswordPolicy struct {
|
||||
type Groupware struct {
|
||||
Enabled bool `yaml:"enabled" env:"FRONTEND_GROUPWARE_ENABLED" desc:"Enable groupware features. Defaults to false." introductionVersion:"3.7.0"`
|
||||
}
|
||||
|
||||
type OpenXchange struct {
|
||||
Enabled bool `yaml:"enabled" env:"FRONTEND_OPENXCHANGE_ENABLED" desc:"Enable Open-Xchange integration. Defaults to false." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
|
||||
ApiUrl string `yaml:"api_url" env:"FRONTEND_OPENXCHANGE_API_URL" desc:"The URL of the Open-Xchange API. Required if Open-Xchange integration is enabled." introductionVersion:"%%NEXT_PRODUCTION_VERSION%%"`
|
||||
}
|
||||
@@ -158,10 +158,6 @@ func DefaultConfig() *config.Config {
|
||||
Groupware: config.Groupware{
|
||||
Enabled: false,
|
||||
},
|
||||
OpenXchange: config.OpenXchange{
|
||||
Enabled: false,
|
||||
ApiUrl: "",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -343,10 +343,6 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string
|
||||
"groupware": map[string]any{
|
||||
"enabled": cfg.Groupware.Enabled,
|
||||
},
|
||||
"open_xchange": map[string]any{
|
||||
"enabled": cfg.OpenXchange.Enabled,
|
||||
"api_url": cfg.OpenXchange.ApiUrl,
|
||||
},
|
||||
},
|
||||
"version": map[string]any{
|
||||
"product": "OpenCloud",
|
||||
|
||||
@@ -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