Skip to content

Commit

Permalink
Merge pull request #1772 from hashicorp/revert-1746-fix-dc-sort
Browse files Browse the repository at this point in the history
Revert "fix: datacenter sort should be by RTT and is instead lexical"
  • Loading branch information
roncodingenthusiast authored Jun 27, 2023
2 parents 919fd5f + 3b89bd5 commit 74fa6ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dependency/catalog_datacenters.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package dependency
import (
"log"
"net/url"
"sort"
"time"

"github.com/hashicorp/consul/api"
Expand Down Expand Up @@ -88,6 +89,8 @@ func (d *CatalogDatacentersQuery) Fetch(clients *ClientSet, opts *QueryOptions)

log.Printf("[TRACE] %s: returned %d results", d, len(result))

sort.Strings(result)

return respWithMetadata(result)
}

Expand Down

0 comments on commit 74fa6ff

Please sign in to comment.