Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions lib/tbot/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,22 +565,7 @@ func ReadConfig(reader io.ReadSeeker, manualMigration bool) (*BotConfig, error)

switch version.Version {
case V1, "":
if !manualMigration {
log.WarnContext(
context.TODO(), "Deprecated config version (V1) detected. Attempting to perform an on-the-fly in-memory migration to latest version. Please persist the config migration using `tbot migrate`.")
}
config := &configV1{}
if err := decoder.Decode(config); err != nil {
return nil, trace.BadParameter("failed parsing config file: %s", strings.ReplaceAll(err.Error(), "\n", ""))
}
latestConfig, err := config.migrate()
if err != nil {
return nil, trace.WithUserMessage(
trace.Wrap(err, "migrating v1 config"),
"Failed to migrate. Please contact Teleport support or use https://goteleport.com/docs/reference/machine-id/configuration/ to manually migrate your configuration.",
)
}
return latestConfig, nil
return nil, trace.BadParameter("configuration version v1 is no longer supported")
case V2:
if manualMigration {
return nil, trace.BadParameter("configuration already the latest version. nothing to migrate.")
Expand Down
Loading
Loading