Add runner group to the scale set list output
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
52007f4ffa
commit
a38d72a01c
6 changed files with 9 additions and 10 deletions
|
|
@ -436,7 +436,7 @@ func formatScaleSets(scaleSets []params.ScaleSet) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
t := table.NewWriter()
|
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)
|
t.AppendHeader(header)
|
||||||
|
|
||||||
for _, scaleSet := range scaleSets {
|
for _, scaleSet := range scaleSets {
|
||||||
|
|
@ -454,7 +454,7 @@ func formatScaleSets(scaleSets []params.ScaleSet) {
|
||||||
belongsTo = scaleSet.EnterpriseName
|
belongsTo = scaleSet.EnterpriseName
|
||||||
level = entityTypeEnterprise
|
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()
|
t.AppendSeparator()
|
||||||
}
|
}
|
||||||
fmt.Println(t.Render())
|
fmt.Println(t.Render())
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -36,7 +36,7 @@ require (
|
||||||
gorm.io/datatypes v1.2.5
|
gorm.io/datatypes v1.2.5
|
||||||
gorm.io/driver/mysql v1.5.7
|
gorm.io/driver/mysql v1.5.7
|
||||||
gorm.io/driver/sqlite v1.5.7
|
gorm.io/driver/sqlite v1.5.7
|
||||||
gorm.io/gorm v1.26.0
|
gorm.io/gorm v1.26.1
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
|
|
|
||||||
4
go.sum
4
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 h1:xA+Y1KDNspv79q43bPyjDMUgHoYHLhXYmdFcYPobg8g=
|
||||||
gorm.io/driver/sqlserver v1.5.4/go.mod h1:+frZ/qYmuna11zHPlh5oc2O6ZA/lS88Keb0XSH1Zh/g=
|
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.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
|
||||||
gorm.io/gorm v1.26.0 h1:9lqQVPG5aNNS6AyHdRiwScAVnXHg/L/Srzx55G5fOgs=
|
gorm.io/gorm v1.26.1 h1:ghB2gUI9FkS46luZtn6DLZ0f6ooBJ5IbVej2ENFDjRw=
|
||||||
gorm.io/gorm v1.26.0/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
|
gorm.io/gorm v1.26.1/go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE=
|
||||||
|
|
|
||||||
4
vendor/gorm.io/gorm/gorm.go
generated
vendored
4
vendor/gorm.io/gorm/gorm.go
generated
vendored
|
|
@ -110,8 +110,6 @@ type DB struct {
|
||||||
type Session struct {
|
type Session struct {
|
||||||
DryRun bool
|
DryRun bool
|
||||||
PrepareStmt bool
|
PrepareStmt bool
|
||||||
PrepareStmtMaxSize int
|
|
||||||
PrepareStmtTTL time.Duration
|
|
||||||
NewDB bool
|
NewDB bool
|
||||||
Initialized bool
|
Initialized bool
|
||||||
SkipHooks bool
|
SkipHooks bool
|
||||||
|
|
@ -275,7 +273,7 @@ func (db *DB) Session(config *Session) *DB {
|
||||||
if v, ok := db.cacheStore.Load(preparedStmtDBKey); ok {
|
if v, ok := db.cacheStore.Load(preparedStmtDBKey); ok {
|
||||||
preparedStmt = v.(*PreparedStmtDB)
|
preparedStmt = v.(*PreparedStmtDB)
|
||||||
} else {
|
} else {
|
||||||
preparedStmt = NewPreparedStmtDB(db.ConnPool, config.PrepareStmtMaxSize, config.PrepareStmtTTL)
|
preparedStmt = NewPreparedStmtDB(db.ConnPool, db.PrepareStmtMaxSize, db.PrepareStmtTTL)
|
||||||
db.cacheStore.Store(preparedStmtDBKey, preparedStmt)
|
db.cacheStore.Store(preparedStmtDBKey, preparedStmt)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
3
vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go
generated
vendored
3
vendor/gorm.io/gorm/internal/stmt_store/stmt_store.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package stmt_store
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
|
"math"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
|
@ -73,7 +74,7 @@ type Store interface {
|
||||||
// the cache can theoretically store as many elements as possible.
|
// the cache can theoretically store as many elements as possible.
|
||||||
// (1 << 63) - 1 is the maximum value that an int64 type can represent.
|
// (1 << 63) - 1 is the maximum value that an int64 type can represent.
|
||||||
const (
|
const (
|
||||||
defaultMaxSize = (1 << 63) - 1
|
defaultMaxSize = math.MaxInt
|
||||||
// defaultTTL defines the default time-to-live (TTL) for each cache entry.
|
// 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.
|
// When the TTL for cache entries is not specified, each cache entry will expire after 24 hours.
|
||||||
defaultTTL = time.Hour * 24
|
defaultTTL = time.Hour * 24
|
||||||
|
|
|
||||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
|
@ -362,7 +362,7 @@ gorm.io/driver/mysql
|
||||||
# gorm.io/driver/sqlite v1.5.7
|
# gorm.io/driver/sqlite v1.5.7
|
||||||
## explicit; go 1.20
|
## explicit; go 1.20
|
||||||
gorm.io/driver/sqlite
|
gorm.io/driver/sqlite
|
||||||
# gorm.io/gorm v1.26.0
|
# gorm.io/gorm v1.26.1
|
||||||
## explicit; go 1.18
|
## explicit; go 1.18
|
||||||
gorm.io/gorm
|
gorm.io/gorm
|
||||||
gorm.io/gorm/callbacks
|
gorm.io/gorm/callbacks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue