From a38d72a01c47afe3eb4b335fc623f94f74d6a674 Mon Sep 17 00:00:00 2001 From: Gabriel Adrian Samfira Date: Thu, 8 May 2025 08:09:54 +0000 Subject: [PATCH] Add runner group to the scale set list output Signed-off-by: Gabriel Adrian Samfira --- cmd/garm-cli/cmd/scalesets.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- vendor/gorm.io/gorm/gorm.go | 4 +--- vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go | 3 ++- vendor/modules.txt | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) diff --git a/cmd/garm-cli/cmd/scalesets.go b/cmd/garm-cli/cmd/scalesets.go index 79486a0e..920b60cf 100644 --- a/cmd/garm-cli/cmd/scalesets.go +++ b/cmd/garm-cli/cmd/scalesets.go @@ -436,7 +436,7 @@ func formatScaleSets(scaleSets []params.ScaleSet) { return } t := table.NewWriter() - header := table.Row{"ID", "Scale Set Name", "Image", "Flavor", "Belongs to", "Level", "Enabled", "Runner Prefix", "Provider"} + header := table.Row{"ID", "Scale Set Name", "Image", "Flavor", "Belongs to", "Level", "Runner Group", "Enabled", "Runner Prefix", "Provider"} t.AppendHeader(header) for _, scaleSet := range scaleSets { @@ -454,7 +454,7 @@ func formatScaleSets(scaleSets []params.ScaleSet) { belongsTo = scaleSet.EnterpriseName level = entityTypeEnterprise } - t.AppendRow(table.Row{scaleSet.ID, scaleSet.Name, scaleSet.Image, scaleSet.Flavor, belongsTo, level, scaleSet.Enabled, scaleSet.GetRunnerPrefix(), scaleSet.ProviderName}) + t.AppendRow(table.Row{scaleSet.ID, scaleSet.Name, scaleSet.Image, scaleSet.Flavor, belongsTo, level, scaleSet.GitHubRunnerGroup, scaleSet.Enabled, scaleSet.GetRunnerPrefix(), scaleSet.ProviderName}) t.AppendSeparator() } fmt.Println(t.Render()) diff --git a/go.mod b/go.mod index db57a68b..a0b3901f 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( gorm.io/datatypes v1.2.5 gorm.io/driver/mysql v1.5.7 gorm.io/driver/sqlite v1.5.7 - gorm.io/gorm v1.26.0 + gorm.io/gorm v1.26.1 ) require ( diff --git a/go.sum b/go.sum index 5ca7575d..3c9af9bb 100644 --- a/go.sum +++ b/go.sum @@ -229,5 +229,5 @@ gorm.io/driver/sqlite v1.5.7/go.mod h1:U+J8craQU6Fzkcvu8oLeAQmi50TkwPEhHDEjQZXDa gorm.io/driver/sqlserver v1.5.4 h1:xA+Y1KDNspv79q43bPyjDMUgHoYHLhXYmdFcYPobg8g= gorm.io/driver/sqlserver v1.5.4/go.mod h1:+frZ/qYmuna11zHPlh5oc2O6ZA/lS88Keb0XSH1Zh/g= gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8= -gorm.io/gorm v1.26.0 h1:9lqQVPG5aNNS6AyHdRiwScAVnXHg/L/Srzx55G5fOgs= -gorm.io/gorm v1.26.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= +gorm.io/gorm v1.26.1 h1:ghB2gUI9FkS46luZtn6DLZ0f6ooBJ5IbVej2ENFDjRw= +gorm.io/gorm v1.26.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE= diff --git a/vendor/gorm.io/gorm/gorm.go b/vendor/gorm.io/gorm/gorm.go index d253736d..63a28b37 100644 --- a/vendor/gorm.io/gorm/gorm.go +++ b/vendor/gorm.io/gorm/gorm.go @@ -110,8 +110,6 @@ type DB struct { type Session struct { DryRun bool PrepareStmt bool - PrepareStmtMaxSize int - PrepareStmtTTL time.Duration NewDB bool Initialized bool SkipHooks bool @@ -275,7 +273,7 @@ func (db *DB) Session(config *Session) *DB { if v, ok := db.cacheStore.Load(preparedStmtDBKey); ok { preparedStmt = v.(*PreparedStmtDB) } else { - preparedStmt = NewPreparedStmtDB(db.ConnPool, config.PrepareStmtMaxSize, config.PrepareStmtTTL) + preparedStmt = NewPreparedStmtDB(db.ConnPool, db.PrepareStmtMaxSize, db.PrepareStmtTTL) db.cacheStore.Store(preparedStmtDBKey, preparedStmt) } diff --git a/vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go b/vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go index 7068419d..a82b2cf5 100644 --- a/vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go +++ b/vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go @@ -3,6 +3,7 @@ package stmt_store import ( "context" "database/sql" + "math" "sync" "time" @@ -73,7 +74,7 @@ type Store interface { // the cache can theoretically store as many elements as possible. // (1 << 63) - 1 is the maximum value that an int64 type can represent. const ( - defaultMaxSize = (1 << 63) - 1 + defaultMaxSize = math.MaxInt // defaultTTL defines the default time-to-live (TTL) for each cache entry. // When the TTL for cache entries is not specified, each cache entry will expire after 24 hours. defaultTTL = time.Hour * 24 diff --git a/vendor/modules.txt b/vendor/modules.txt index 9ca8e528..5cb70bb1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -362,7 +362,7 @@ gorm.io/driver/mysql # gorm.io/driver/sqlite v1.5.7 ## explicit; go 1.20 gorm.io/driver/sqlite -# gorm.io/gorm v1.26.0 +# gorm.io/gorm v1.26.1 ## explicit; go 1.18 gorm.io/gorm gorm.io/gorm/callbacks