From 0fe5ea6c32ed4c822acd83ffafb3d8537c64f0f0 Mon Sep 17 00:00:00 2001 From: Brian Meek Date: Sat, 17 Sep 2022 14:10:36 -0700 Subject: [PATCH] After discovering the full path using the go nm tool, properly set the ReleaseVersion in the clientapi router Signed-off-by: Brian Meek --- build/docker/Dockerfile.monolith | 2 +- clientapi/routing/routing.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/build/docker/Dockerfile.monolith b/build/docker/Dockerfile.monolith index 2d75c8ac1..b3415171f 100644 --- a/build/docker/Dockerfile.monolith +++ b/build/docker/Dockerfile.monolith @@ -9,7 +9,7 @@ WORKDIR /build COPY . /build RUN mkdir -p bin -RUN go build -trimpath -o bin/ -ldflags="-X routing.ReleaseVersion=$RELEASE_VERSION" ./cmd/dendrite-monolith-server +RUN go build -trimpath -o bin/ -ldflags="-X 'github.com/matrix-org/dendrite/clientapi/routing.ReleaseVersion=$RELEASE_VERSION'" ./cmd/dendrite-monolith-server RUN go build -trimpath -o bin/ ./cmd/create-account RUN go build -trimpath -o bin/ ./cmd/generate-keys diff --git a/clientapi/routing/routing.go b/clientapi/routing/routing.go index de441b7d8..a06ef3c12 100644 --- a/clientapi/routing/routing.go +++ b/clientapi/routing/routing.go @@ -64,6 +64,11 @@ func Setup( extRoomsProvider api.ExtraPublicRoomsProvider, mscCfg *config.MSCs, natsClient *nats.Conn, ) { + + logrus.WithFields(logrus.Fields{ + "ReleaseVersion": ReleaseVersion, + }).Info("Started clientAPI router with ReleaseVersion") + prometheus.MustRegister(amtRegUsers, sendEventDuration) rateLimits := httputil.NewRateLimits(&cfg.RateLimiting)