Update kine to v0.5.1 for compact fix

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
This commit is contained in:
Brad Davidson 2020-11-12 19:14:07 -08:00 committed by Brad Davidson
parent 2c666af483
commit ea312a303e
6 changed files with 9 additions and 11 deletions

2
go.mod
View file

@ -88,7 +88,7 @@ require (
github.com/pkg/errors v0.9.1
github.com/rancher/dynamiclistener v0.2.1
github.com/rancher/helm-controller v0.7.3
github.com/rancher/kine v0.5.0
github.com/rancher/kine v0.5.1
github.com/rancher/remotedialer v0.2.0
github.com/rancher/wrangler v0.6.1
github.com/rancher/wrangler-api v0.6.0

4
go.sum
View file

@ -671,8 +671,8 @@ github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373 h1:BePi97poJ
github.com/rancher/go-powershell v0.0.0-20200701184732-233247d45373/go.mod h1:Vz8oLnHgttpo/aZrTpjbcpZEDzzElqNau2zmorToY0E=
github.com/rancher/helm-controller v0.7.3 h1:WTQHcNF2vl9w6Xd1eBtXDe0JUsYMFFstqX9ghGhI5Ac=
github.com/rancher/helm-controller v0.7.3/go.mod h1:ZylsxIMGNADRPRNW+NiBWhrwwks9vnKLQiCHYWb6Bi0=
github.com/rancher/kine v0.5.0 h1:ot9ZInMCb0482aWfvO+3gI2B+e9vGxpY12EDJgpowiY=
github.com/rancher/kine v0.5.0/go.mod h1:NoqDMfN0Q+Wu23Kk3MfXfgLO2fE6abLaetejZs9HAYo=
github.com/rancher/kine v0.5.1 h1:pBAD9LVU3oCuRWzY6lKEVqhNi1nZlJV3bbD4G2mrE1c=
github.com/rancher/kine v0.5.1/go.mod h1:NoqDMfN0Q+Wu23Kk3MfXfgLO2fE6abLaetejZs9HAYo=
github.com/rancher/kubernetes v1.19.3-k3s1 h1:Tfr1qShnWaNGx4kyBSW5A9rvISgHjEg0KRvvZIV5Zpc=
github.com/rancher/kubernetes v1.19.3-k3s1/go.mod h1:yhT1/ltQajQsha3tnYc9QPFYSumGM45nlZdjf7WqE1A=
github.com/rancher/kubernetes/staging/src/k8s.io/api v1.19.3-k3s1 h1:+C1BPPjbCfFFcStBNUJ1gqIDYxdkvbKuZXm3CTQXFxY=

View file

@ -74,6 +74,7 @@ func New(ctx context.Context, dataSourceName string, tlsInfo tls.Config, connPoo
SELECT kp.prev_revision AS id
FROM kine AS kp
WHERE
kp.name != 'compact_rev_key' AND
kp.prev_revision != 0 AND
kp.id <= ?
UNION
@ -83,9 +84,7 @@ func New(ctx context.Context, dataSourceName string, tlsInfo tls.Config, connPoo
kd.deleted != 0 AND
kd.id <= ?
) AS ks
ON
kv.id = ks.id AND
kv.name != 'compact_rev_key'`
ON kv.id = ks.id`
dialect.TranslateErr = func(err error) error {
if err, ok := err.(*mysql.MySQLError); ok && err.Number == 1062 {
return server.ErrKeyExists

View file

@ -64,6 +64,7 @@ func New(ctx context.Context, dataSourceName string, tlsInfo tls.Config, connPoo
SELECT kp.prev_revision AS id
FROM kine AS kp
WHERE
kp.name != 'compact_rev_key' AND
kp.prev_revision != 0 AND
kp.id <= $1
UNION
@ -73,9 +74,7 @@ func New(ctx context.Context, dataSourceName string, tlsInfo tls.Config, connPoo
kd.deleted != 0 AND
kd.id <= $2
) AS ks
WHERE
kv.id = ks.id AND
kv.name != 'compact_rev_key'`
WHERE kv.id = ks.id`
dialect.TranslateErr = func(err error) error {
if err, ok := err.(*pq.Error); ok && err.Code == "23505" {
return server.ErrKeyExists

View file

@ -64,11 +64,11 @@ func NewVariant(ctx context.Context, driverName, dataSourceName string, connPool
dialect.CompactSQL = `
DELETE FROM kine AS kv
WHERE
kv.name != 'compact_rev_key' AND
kv.id IN (
SELECT kp.prev_revision AS id
FROM kine AS kp
WHERE
kp.name != 'compact_rev_key' AND
kp.prev_revision != 0 AND
kp.id <= ?
UNION

2
vendor/modules.txt vendored
View file

@ -835,7 +835,7 @@ github.com/rancher/helm-controller/pkg/generated/informers/externalversions/helm
github.com/rancher/helm-controller/pkg/generated/informers/externalversions/internalinterfaces
github.com/rancher/helm-controller/pkg/generated/listers/helm.cattle.io/v1
github.com/rancher/helm-controller/pkg/helm
# github.com/rancher/kine v0.5.0
# github.com/rancher/kine v0.5.1
## explicit
github.com/rancher/kine/pkg/broadcaster
github.com/rancher/kine/pkg/client