Compare commits

...

4 Commits

Author SHA1 Message Date
Michael Flemming
754f0fa5b7 Merge pull request #2229 from opencloud-eu/fix_docs_gen_path
fix path and trigger for docsGenPr
2026-01-28 18:03:15 +01:00
Michael 'Flimmy' Flemming
38cf037a11 fix path and trigger for docsGenPr 2026-01-28 17:53:11 +01:00
OpenCloud Devops
9eac47dab4 🎉 Release 5.0.1 (#2218)
* 🎉 Release 5.0.1

* 🎉 Release 5.0.1

* 🎉 Release 5.0.1

* 🎉 Release 5.0.1
2026-01-28 16:06:09 +01:00
Viktor Scharf
e7c14d2ee4 reva-bump-2.42.1 (#2225) 2026-01-28 15:51:15 +01:00
7 changed files with 90 additions and 11 deletions

View File

@@ -2230,7 +2230,7 @@ def genDocsPr(ctx):
"MY_TARGET_BRANCH": "${CI_COMMIT_BRANCH##stable-}",
},
"commands": [
'export DOC_GIT_TARGET_FOLDER="$$(if [ \"$$MY_TARGET_BRANCH\" = \"main\" ]; then echo \"tmpdocs/docs/dev/_static/env-vars/\"; else echo \"tmpdocs/versioned_docs/version-$${MY_TARGET_BRANCH}/dev/_static/env-vars/\"; fi)"',
'export DOC_GIT_TARGET_FOLDER="$$(if [ \"$$MY_TARGET_BRANCH\" = \"main\" ]; then echo \"tmpdocs/docs/dev/server/_static/env-vars/\"; else echo \"tmpdocs/versioned_docs/version-$${MY_TARGET_BRANCH}/dev/server/_static/env-vars/\"; fi)"',
'echo "$${CI_SSH_KEY}" > /root/id_rsa && chmod 600 /root/id_rsa',
'git config --global user.email "devops@opencloud.eu"',
'git config --global user.name "openclouders"',
@@ -2255,8 +2255,8 @@ def genDocsPr(ctx):
},
{
"event": "cron",
"branch": "[main]",
"cron": "nightly *",
"branch": "main",
"cron": "nightly*",
},
],
}]

View File

@@ -1,5 +1,23 @@
# Changelog
## [5.0.1](https://github.com/opencloud-eu/opencloud/releases/tag/v5.0.1) - 2026-01-28
### ❤️ Thanks to all contributors! ❤️
@ScharfViktor, @aduffeck, @saw-jan
### 🐛 Bug Fixes
- Do not ever set a TTL for the ID cache. It's not supposed to expire. [[#2223](https://github.com/opencloud-eu/opencloud/pull/2223)]
### ✅ Tests
- test(api): wait for web-office readiness by checking discovery endpoint [[#2217](https://github.com/opencloud-eu/opencloud/pull/2217)]
### 📦️ Dependencies
- reva-bump-2.42.1 [[#2225](https://github.com/opencloud-eu/opencloud/pull/2225)]
## [5.0.0](https://github.com/opencloud-eu/opencloud/releases/tag/v5.0.0) - 2026-01-26
### ❤️ Thanks to all contributors! ❤️

2
go.mod
View File

@@ -65,7 +65,7 @@ require (
github.com/open-policy-agent/opa v1.12.3
github.com/opencloud-eu/icap-client v0.0.0-20250930132611-28a2afe62d89
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
github.com/opencloud-eu/reva/v2 v2.42.0
github.com/opencloud-eu/reva/v2 v2.42.1
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

4
go.sum
View File

@@ -969,8 +969,8 @@ github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9 h1:dIft
github.com/opencloud-eu/inotifywaitgo v0.0.0-20251111171128-a390bae3c5e9/go.mod h1:JWyDC6H+5oZRdUJUgKuaye+8Ph5hEs6HVzVoPKzWSGI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76 h1:vD/EdfDUrv4omSFjrinT8Mvf+8D7f9g4vgQ2oiDrVUI=
github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76/go.mod h1:pzatilMEHZFT3qV7C/X3MqOa3NlRQuYhlRhZTL+hN6Q=
github.com/opencloud-eu/reva/v2 v2.42.0 h1:CWlXbNqUSduQ5Afi6XoegoJ/zyV0Vx5UoPKAZZmEAq4=
github.com/opencloud-eu/reva/v2 v2.42.0/go.mod h1:pv+w23JG0/qJweZbTzNNev//YEvlUML1L/2iXgKGkkg=
github.com/opencloud-eu/reva/v2 v2.42.1 h1:QUZOLSfAhb7bw+qsVSFMFY644rUz4/NtnOiJ0QQxj2o=
github.com/opencloud-eu/reva/v2 v2.42.1/go.mod h1:pv+w23JG0/qJweZbTzNNev//YEvlUML1L/2iXgKGkkg=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=

View File

@@ -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 = "5.0.0+dev"
LatestTag = "5.0.1+dev"
// Date indicates the build date.
// This has been removed, it looks like you can only replace static strings with recent go versions

View File

@@ -21,6 +21,7 @@ package store
import (
"context"
"crypto/tls"
"fmt"
"strings"
"time"
@@ -32,6 +33,7 @@ import (
"github.com/opencloud-eu/reva/v2/pkg/store/etcd"
"github.com/opencloud-eu/reva/v2/pkg/store/memory"
"go-micro.dev/v4/logger"
"go-micro.dev/v4/store"
microstore "go-micro.dev/v4/store"
)
@@ -125,19 +127,33 @@ func Create(opts ...microstore.Option) microstore.Store {
return *ocMemStore
case TypeNatsJS:
opts, ttl, natsOptions := natsConfig(options.Logger, options.Context, opts)
return natsjs.NewStore(
store := natsjs.NewStore(
append(opts,
natsjs.NatsOptions(natsOptions), // always pass in properly initialized default nats options
natsjs.DefaultTTL(ttl))..., // nats needs a DefaultTTL option as it does not support per Write TTL
)
err := updateNatsStore(opts, ttl, natsOptions)
if err != nil {
options.Logger.Logf(logger.ErrorLevel, "failed to update nats-js store: '%s'", err.Error())
}
return store
case TypeNatsJSKV:
opts, ttl, natsOptions := natsConfig(options.Logger, options.Context, opts)
return natsjskv.NewStore(
store := natsjskv.NewStore(
append(opts,
natsjskv.NatsOptions(natsOptions), // always pass in properly initialized default nats options
natsjskv.EncodeKeys(), // nats has restrictions on the key, we cannot use slashes
natsjskv.DefaultTTL(ttl))..., // nats needs a DefaultTTL option as it does not support per Write TTL
)
err := updateNatsStore(opts, ttl, natsOptions)
if err != nil {
options.Logger.Logf(logger.ErrorLevel, "failed to update nats-js-kv store: '%s'", err.Error())
}
return store
case TypeMemory, "mem", "": // allow existing short form and use as default
return microstore.NewMemoryStore(opts...)
default:
@@ -146,13 +162,58 @@ func Create(opts ...microstore.Option) microstore.Store {
}
}
func updateNatsStore(opts []store.Option, ttl time.Duration, natsOptions nats.Options) error {
options := store.Options{}
for _, o := range opts {
o(&options)
}
bucketName := options.Database
if bucketName == "" {
return fmt.Errorf("bucket name (database) must be set")
}
if len(options.Nodes) > 0 {
natsOptions.Servers = options.Nodes
}
nc, err := natsOptions.Connect()
if err != nil {
return fmt.Errorf("could not connect to nats: %w", err)
}
defer nc.Close()
js, err := nc.JetStream()
if err != nil {
return err
}
// NATS KV buckets are actually streams named "KV_<bucket_name>"
info, err := js.StreamInfo("KV_" + bucketName)
if err != nil {
return fmt.Errorf("failed to get bucket info: %w", err)
}
config := info.Config
config.MaxAge = ttl
_, err = js.UpdateStream(&config)
if err != nil {
return fmt.Errorf("failed to update bucket TTL: %w", err)
}
return nil
}
func natsConfig(log logger.Logger, ctx context.Context, opts []microstore.Option) ([]microstore.Option, time.Duration, nats.Options) {
if mem, _ := ctx.Value(disablePersistanceContextKey{}).(bool); mem {
opts = append(opts, natsjs.DefaultMemory())
}
ttl, _ := ctx.Value(ttlContextKey{}).(time.Duration)
ttl := time.Duration(0)
if d, ok := ctx.Value(ttlContextKey{}).(time.Duration); ok {
ttl = d
}
// preparing natsOptions before the switch to reuse the same code
natsOptions := nats.GetDefaultOptions()

2
vendor/modules.txt vendored
View File

@@ -1376,7 +1376,7 @@ github.com/opencloud-eu/icap-client
# github.com/opencloud-eu/libre-graph-api-go v1.0.8-0.20250724122329-41ba6b191e76
## explicit; go 1.18
github.com/opencloud-eu/libre-graph-api-go
# github.com/opencloud-eu/reva/v2 v2.42.0
# github.com/opencloud-eu/reva/v2 v2.42.1
## explicit; go 1.24.1
github.com/opencloud-eu/reva/v2/cmd/revad/internal/grace
github.com/opencloud-eu/reva/v2/cmd/revad/runtime