Skip to content

Commit

Permalink
move comment
Browse files Browse the repository at this point in the history
  • Loading branch information
benwaffle authored and billyb2 committed Jun 7, 2023
1 parent 305fc3f commit 3e38b0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/command/migrate_to_v2/machines.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ func (m *v2PlatformMigrator) createLaunchMachineInput(oldAllocID string, skipLau
mConfig.Metadata[api.MachineConfigMetadataKeyFlyManagedPostgres] = "true"
}

// We have manual overrides for some regions with the names <region>2 e.g ams2, iad2.
// These cause migrations to fail. Here we handle that specific case.
if m.appConfig == nil {
// FIXME better error message here
return nil, fmt.Errorf("Could not find app config")
Expand All @@ -62,6 +60,8 @@ func (m *v2PlatformMigrator) createLaunchMachineInput(oldAllocID string, skipLau
region = m.appConfig.PrimaryRegion
}

// We have manual overrides for some regions with the names <region>2 e.g ams2, iad2.
// These cause migrations to fail. Here we handle that specific case.
if strings.HasSuffix(region, "2") {
region = region[0:3]
}
Expand Down

0 comments on commit 3e38b0e

Please sign in to comment.