upgrade to go1.20 and auto set go mem limit (#5732)

* upgrade to go1.19 and set go mem limit

* create ocis-pkg memlimit package

* use std automemlimit import

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* import automemlimit in every ocis service, drop ocis-pkg/memlimit package

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* bump go to 1.20

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* drop unused config options and env vars

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update all version numbers, add doc

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix lint

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update bingo and mockery

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* bump golangci-lint

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* fix selector test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* Update changelog/unreleased/enhancement-memlimit.md

Co-authored-by: kobergj <juliankoberg@googlemail.com>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Willy Kloucek <wkloucek@owncloud.com>
Co-authored-by: kobergj <juliankoberg@googlemail.com>
This commit is contained in:
Jörn Friedrich Dreyer
2023-03-20 17:22:02 +01:00
committed by GitHub
co-authored by kobergj Willy Kloucek
parent 4cda9260d3
commit 474c4b848d
19 changed files with 404 additions and 538 deletions
@@ -28,10 +28,6 @@ import (
"github.com/owncloud/ocis/v2/services/graph/pkg/service/v0/errorcode"
)
type classList struct {
Value []*libregraph.EducationClass
}
var _ = Describe("EducationClass", func() {
var (
svc service.Service
+3 -3
View File
@@ -111,21 +111,21 @@ func NewService(opts ...Option) (Graph, error) {
m := chi.NewMux()
m.Use(options.Middleware...)
spacePropertiesCache := ttlcache.New[string, interface{}](
spacePropertiesCache := ttlcache.New(
ttlcache.WithTTL[string, interface{}](
time.Duration(options.Config.Spaces.ExtendedSpacePropertiesCacheTTL),
),
)
go spacePropertiesCache.Start()
usersCache := ttlcache.New[string, libregraph.User](
usersCache := ttlcache.New(
ttlcache.WithTTL[string, libregraph.User](
time.Duration(options.Config.Spaces.UsersCacheTTL),
),
)
go usersCache.Start()
groupsCache := ttlcache.New[string, libregraph.Group](
groupsCache := ttlcache.New(
ttlcache.WithTTL[string, libregraph.Group](
time.Duration(options.Config.Spaces.GroupsCacheTTL),
),