Skip to content

Commit

Permalink
Synchronize common files from prometheus/prometheus (prometheus#3191)
Browse files Browse the repository at this point in the history
* Update common Prometheus files

* cluster: fix formatting

Signed-off-by: prombot <prometheus-team@googlegroups.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
  • Loading branch information
2 people authored and radek-ryckowski committed Nov 6, 2023
1 parent 00450df commit 867941f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.common
Expand Up @@ -61,7 +61,7 @@ PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_
SKIP_GOLANGCI_LINT :=
GOLANGCI_LINT :=
GOLANGCI_LINT_OPTS ?=
GOLANGCI_LINT_VERSION ?= v1.49.0
GOLANGCI_LINT_VERSION ?= v1.50.1
# golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
# windows isn't included here because of the path separator being different.
ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
Expand Down
6 changes: 4 additions & 2 deletions cluster/advertise.go
Expand Up @@ -23,8 +23,10 @@ import (
type getIPFunc func() (string, error)

// These are overridden in unit tests to mock the sockaddr functions.
var getPrivateAddress getIPFunc = sockaddr.GetPrivateIP
var getPublicAddress getIPFunc = sockaddr.GetPublicIP
var (
getPrivateAddress getIPFunc = sockaddr.GetPrivateIP
getPublicAddress getIPFunc = sockaddr.GetPublicIP
)

// calculateAdvertiseAddress attempts to clone logic from deep within memberlist
// (NetTransport.FinalAdvertiseAddr) in order to surface its conclusions to the
Expand Down

0 comments on commit 867941f

Please sign in to comment.