1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 13:55:21 +02:00

fix(migrator): fix setting version struct fields after migration [EE-4613] (#8090)

* fix setting version struct fields

* fix go tests

* remove versionUpdateRequired

* remove old code that was originally for debugging purposes
This commit is contained in:
Matt Hook 2022-11-28 19:28:10 +13:00 committed by GitHub
parent d78b762f7b
commit 95bc508462
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 32 deletions

View file

@ -8,7 +8,6 @@ import (
"path"
"strconv"
"strings"
"time"
"github.com/portainer/libhelm"
portainer "github.com/portainer/portainer/api"
@ -142,15 +141,6 @@ func initDataStore(flags *portainer.CLIFlags, secretKey []byte, fileService port
go func() {
<-shutdownCtx.Done()
defer connection.Close()
exportFilename := path.Join(*flags.Data, fmt.Sprintf("export-%d.json", time.Now().Unix()))
err := store.Export(exportFilename)
if err != nil {
log.Error().Str("filename", exportFilename).Err(err).Msg("failed to export")
} else {
log.Debug().Str("filename", exportFilename).Msg("exported")
}
}()
return store