Compare commits

..
20 Commits
Author SHA1 Message Date
OpenCloud Devops 07859d9ac4 🎉 Release 4.0.6 (#2672)
* 🎉 Release 4.0.6

* 🎉 Release 4.0.6

* 🎉 Release 4.0.6

* 🎉 Release 4.0.6
2026-04-29 13:38:03 +02:00
Viktor Scharf 2aa6943eaf bump version 4.0.6 (#2694) 2026-04-29 12:30:26 +02:00
Benedikt Kulmann a7bb32bf64 chore(web): bump web to v4.2.2 (#2580) 2026-04-29 11:01:33 +02:00
Jörn Friedrich Dreyer df4bc7c1d8 update comment
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
(cherry picked from commit 9135eab27e)
2026-04-28 17:24:06 +02:00
Jörn Friedrich Dreyer 2ef5d1289d stop metrics tickers on context cancel
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
(cherry picked from commit 2d1cc3fb3a)
2026-04-28 17:24:06 +02:00
Ralf Haferkamp 8ec82331cc fix: avoid suture.Supervisor being shutdown early
Previously the Supervisor was shutdonw as soon as the main context was
canceled. Which cause the managed services to fail during shutdown (in
"trapShutdownCtx()") as the Supervisor was gone already.

We now pass a separate Context to Supervisor.ServeBackground() to avoid
this.

Fixes: #2282
(cherry picked from commit 7a149787d0)
2026-04-28 17:24:06 +02:00
Ralf Haferkamp 15fc59626b Revert "Hotfix for https://github.com/opencloud-eu/opencloud/issues/2282"
This reverts commit 5e889612d6.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp 813f42f825 Revert "Fix timeout for ocwrapper"
This reverts commit 193431b875.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp f0e9e10fa7 Revert "wrapper fix: kill all opencloud and nats processes"
This reverts commit 62674c71cf.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp 32549ae0e1 Revert "use process group kill"
This reverts commit 7374ae61a9.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp f70ce6d8a8 Revert "return waitAllServices"
This reverts commit 3434f55c78.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp e9ce946fe0 Revert "introduce ci env variable"
This reverts commit 01686db6d9.
2026-04-28 17:24:06 +02:00
Ralf Haferkamp c0b0910000 Revert "fix typo"
This reverts commit 4af5add77d.
2026-04-28 17:24:06 +02:00
Christian Richter 4af5add77d fix typo
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-04-24 12:21:20 +02:00
Christian Richter 01686db6d9 introduce ci env variable
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-04-24 12:21:20 +02:00
v.scharf 3434f55c78 return waitAllServices 2026-04-24 12:21:20 +02:00
v.scharf 7374ae61a9 use process group kill 2026-04-24 12:21:20 +02:00
v.scharf 62674c71cf wrapper fix: kill all opencloud and nats processes 2026-04-24 12:21:20 +02:00
Christian Richter 193431b875 Fix timeout for ocwrapper
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-04-24 12:21:20 +02:00
Christian RichterandJörn Dreyer 5e889612d6 Hotfix for https://github.com/opencloud-eu/opencloud/issues/2282
Co-authored-by: Jörn Dreyer <jfd@butonic.de>
Signed-off-by: Christian Richter <c.richter@opencloud.eu>
2026-04-24 12:21:20 +02:00
8 changed files with 54 additions and 35 deletions

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
# The test runner source for UI tests
WEB_COMMITID=50e3fff6a518361d59cba864a927470f313b6f91
WEB_COMMITID=c247f854a95b7bcaf10f27577458d2f566b2f939
WEB_BRANCH=stable-4.2
+10
View File
@@ -1,5 +1,15 @@
# Changelog
## [4.0.6](https://github.com/opencloud-eu/opencloud/releases/tag/v4.0.6) - 2026-04-29
### ❤️ Thanks to all contributors! ❤️
@ScharfViktor, @dragonchaser, @kulmann, @rhafer
### 🐛 Bug Fixes
- [stable-4.0] More graceful shutdown fixes [[#2692](https://github.com/opencloud-eu/opencloud/pull/2692)]
## [4.0.5](https://github.com/opencloud-eu/opencloud/releases/tag/v4.0.5) - 2026-04-02
### ❤️ Thanks to all contributors! ❤️
+3 -6
View File
@@ -434,12 +434,9 @@ func Start(ctx context.Context, o ...Option) error {
// prepare the set of services to run
s.generateRunSet(s.cfg)
// There are reasons not to do this, but we have race conditions ourselves. Until we resolve them, mind the following disclaimer:
// Calling ServeBackground will CORRECTLY start the supervisor running in a new goroutine. It is risky to directly run
// go supervisor.Serve()
// because that will briefly create a race condition as it starts up, if you try to .Add() services immediately afterward.
// https://pkg.go.dev/github.com/thejerf/suture/v4@v4.0.0#Supervisor
go s.Supervisor.ServeBackground(ctx)
// We need to control the order in which services are started and shut down,
// so we need a backgroud context that will outlive the service execution.
go s.Supervisor.ServeBackground(context.Background())
for i, service := range s.Services {
scheduleServiceTokens(s, service)
+1 -1
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 = "4.0.5+dev"
LatestTag = "4.0.6+dev"
// Date indicates the build date.
// This has been removed, it looks like you can only replace static strings with recent go versions
+2
View File
@@ -91,7 +91,9 @@ func Server(cfg *config.Config) *cli.Command {
gr.Add(runner.New(cfg.Service.Name+".svc", func() error {
return natsServer.ListenAndServe()
}, func() {
logger.Info().Msg("Gracefully shutting down the NATS server...")
natsServer.Shutdown()
logger.Info().Msg("NATS server shutdown")
}))
grResults := gr.Run(ctx)
+18 -13
View File
@@ -88,7 +88,7 @@ func NewPostprocessingService(ctx context.Context, logger log.Logger, sto store.
m := metrics.New()
m.BuildInfo.WithLabelValues(version.GetString()).Set(1)
monitorMetrics(raw, "postprocessing-pull", m, logger)
monitorMetrics(ctx, raw, "postprocessing-pull", m, logger)
return &PostprocessingService{
ctx: ctx,
@@ -425,25 +425,30 @@ func (pps *PostprocessingService) findUploadsByStep(step events.Postprocessingst
return ids
}
func monitorMetrics(stream raw.Stream, name string, m *metrics.Metrics, logger log.Logger) {
ctx := context.Background()
func monitorMetrics(ctx context.Context, stream raw.Stream, name string, m *metrics.Metrics, logger log.Logger) {
consumer, err := stream.JetStream().Consumer(ctx, name)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
}
ticker := time.NewTicker(5 * time.Second)
go func() {
for range ticker.C {
info, err := consumer.Info(ctx)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
continue
}
defer ticker.Stop()
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
info, err := consumer.Info(ctx)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
continue
}
m.EventsOutstandingAcks.Set(float64(info.NumAckPending))
m.EventsUnprocessed.Set(float64(info.NumPending))
m.EventsRedelivered.Set(float64(info.NumRedelivered))
logger.Trace().Msg("updated postprocessing event metrics")
m.EventsOutstandingAcks.Set(float64(info.NumAckPending))
m.EventsUnprocessed.Set(float64(info.NumPending))
m.EventsRedelivered.Set(float64(info.NumRedelivered))
logger.Trace().Msg("updated postprocessing event metrics")
}
}
}()
}
+18 -13
View File
@@ -88,7 +88,7 @@ func (s Service) Run() error {
}
if s.m != nil {
monitorMetrics(s.stream, "search-pull", s.m, s.log)
monitorMetrics(s.ctx, s.stream, "search-pull", s.m, s.log)
}
var wg sync.WaitGroup
@@ -202,25 +202,30 @@ func (s Service) processEvent(e raw.Event) error {
return nil
}
func monitorMetrics(stream raw.Stream, name string, m *metrics.Metrics, logger log.Logger) {
ctx := context.Background()
func monitorMetrics(ctx context.Context, stream raw.Stream, name string, m *metrics.Metrics, logger log.Logger) {
consumer, err := stream.JetStream().Consumer(ctx, name)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
}
ticker := time.NewTicker(5 * time.Second)
go func() {
for range ticker.C {
info, err := consumer.Info(ctx)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
continue
}
defer ticker.Stop()
for {
select {
case <-ctx.Done():
return
case <-ticker.C:
info, err := consumer.Info(ctx)
if err != nil {
logger.Error().Err(err).Msg("failed to get consumer")
continue
}
m.EventsOutstandingAcks.Set(float64(info.NumAckPending))
m.EventsUnprocessed.Set(float64(info.NumPending))
m.EventsRedelivered.Set(float64(info.NumRedelivered))
logger.Trace().Msg("updated search event metrics")
m.EventsOutstandingAcks.Set(float64(info.NumAckPending))
m.EventsUnprocessed.Set(float64(info.NumPending))
m.EventsRedelivered.Set(float64(info.NumRedelivered))
logger.Trace().Msg("updated search event metrics")
}
}
}()
}
+1 -1
View File
@@ -1,6 +1,6 @@
SHELL := bash
NAME := web
WEB_ASSETS_VERSION = v4.2.1
WEB_ASSETS_VERSION = v4.2.2
WEB_ASSETS_BRANCH = main
ifneq (, $(shell command -v go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI