Skip to content

Commit d38172b

Browse files
CLOUDP-119550: Fixed PRODUCT_VERSION for the manager (#501)
Fixed PRODUCT_VERSION for the manager
1 parent ece4304 commit d38172b

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ SHELL := /usr/bin/env bash
88
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
99
VERSION ?= 0.5.0
1010

11+
ifndef PRODUCT_VERSION
12+
PRODUCT_VERSION := $(shell git describe --tags --dirty --broken)
13+
endif
14+
1115
# CHANNELS define the bundle channels used in the bundle.
1216
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "preview,fast,stable")
1317
# To re-generate a bundle for other specific channels without changing the standard setup, you can:
@@ -85,7 +89,6 @@ e2e: run-kind ## Run e2e test. Command `make e2e focus=cluster-ns` run cluster-n
8589
./scripts/e2e_local.sh $(focus)
8690

8791
.PHONY: manager
88-
manager: export PRODUCT_VERSION=$(shell git describe --tags --dirty --broken)
8992
manager: generate fmt vet ## Build manager binary
9093
go build -o bin/manager -ldflags="-X main.version=$(PRODUCT_VERSION)" cmd/manager/main.go
9194

cmd/manager/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func main() {
7373
// logging
7474
logger := ctrzap.NewRaw(ctrzap.UseDevMode(true), ctrzap.StacktraceLevel(zap.ErrorLevel))
7575

76-
config := parseConfiguration(logger.Sugar())
76+
config := parseConfiguration(logger.Sugar(), zap.Any("version", atlas.ProductVersion))
7777

7878
ctrl.SetLogger(zapr.NewLogger(logger))
7979

test/int/clusterwide/integration_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func prepareAtlasClient() (*mongodbatlas.Client, atlas.Connection) {
177177
withDigest := httputil.Digest(publicKey, privateKey)
178178
httpClient, err := httputil.DecorateClient(&http.Client{Transport: http.DefaultTransport}, withDigest)
179179
Expect(err).ToNot(HaveOccurred())
180-
aClient, err := mongodbatlas.New(httpClient, mongodbatlas.SetBaseURL(atlasDomain+"/api/atlas/v1.0/"))
180+
aClient, err := mongodbatlas.New(httpClient, mongodbatlas.SetBaseURL(atlasDomain))
181181
Expect(err).ToNot(HaveOccurred())
182182

183183
return aClient, atlas.Connection{

0 commit comments

Comments
 (0)