Add runner group to the scale set list output

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
Gabriel Adrian Samfira 2025-05-08 08:09:54 +00:00
parent 52007f4ffa
commit a38d72a01c
6 changed files with 9 additions and 10 deletions

View file

@ -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())

2
go.mod
View file

@ -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 (

4
go.sum
View file

@ -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=

4
vendor/gorm.io/gorm/gorm.go generated vendored
View file

@ -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)
}

View file

@ -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

2
vendor/modules.txt vendored
View file

@ -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