Skip to content

Commit

Permalink
dev: Add --race option to make run task
Browse files Browse the repository at this point in the history
Enables the race detector on locally running instances
https://go.dev/doc/articles/race_detector. This will report useful
information in the logs about race related issues.

Signed-off-by: Michael Nairn <[email protected]>
  • Loading branch information
mikenairn committed Oct 24, 2024
1 parent 35fbc85 commit 4d0cc64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ run: export OPERATOR_NAMESPACE := $(OPERATOR_NAMESPACE)
run: GIT_SHA=$(shell git rev-parse HEAD || echo "unknown")
run: DIRTY=$(shell $(PROJECT_PATH)/utils/check-git-dirty.sh || echo "unknown")
run: generate fmt vet ## Run a controller from your host.
go run -ldflags "-X main.gitSHA=${GIT_SHA} -X main.dirty=${DIRTY}" ./main.go
go run -ldflags "-X main.gitSHA=${GIT_SHA} -X main.dirty=${DIRTY}" --race ./main.go

docker-build: GIT_SHA=$(shell git rev-parse HEAD || echo "unknown")
docker-build: DIRTY=$(shell $(PROJECT_PATH)/utils/check-git-dirty.sh || echo "unknown")
Expand Down

0 comments on commit 4d0cc64

Please sign in to comment.