From 7589901a4363cad6ead661d5b26932cd53a67ea9 Mon Sep 17 00:00:00 2001 From: Prateek Kumar <85689959+PrateekKumar1709@users.noreply.github.com> Date: Wed, 25 Sep 2024 15:16:06 -0400 Subject: [PATCH] Add mdatagen replace option to check-contrib target (#11223) #### Description This PR addresses the issue of contrib tests not testing the updated mdatagen version. It modifies the `check-contrib` and `restore-contrib` targets in the Makefile to ensure that the contrib tests use the local version of the `mdatagen` package. #### Link to tracking issue Fixes #11167 #### Testing All existing tests pass with `make test` Signed-off-by: Prateek Kumar <85689959+PrateekKumar1709@users.noreply.github.com> --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 58b0335e895..404c97632a9 100644 --- a/Makefile +++ b/Makefile @@ -262,6 +262,7 @@ check-contrib: @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit \ -replace go.opentelemetry.io/collector=$(CURDIR) \ -replace go.opentelemetry.io/collector/client=$(CURDIR)/client \ + -replace go.opentelemetry.io/collector/cmd/mdatagen=$(CURDIR)/cmd/mdatagen \ -replace go.opentelemetry.io/collector/component=$(CURDIR)/component \ -replace go.opentelemetry.io/collector/component/componentprofiles=$(CURDIR)/component/componentprofiles \ -replace go.opentelemetry.io/collector/component/componentstatus=$(CURDIR)/component/componentstatus \ @@ -333,6 +334,7 @@ restore-contrib: @$(MAKE) -C $(CONTRIB_PATH) for-all CMD="$(GOCMD) mod edit \ -dropreplace go.opentelemetry.io/collector \ -dropreplace go.opentelemetry.io/collector/client \ + -dropreplace go.opentelemetry.io/collector/cmd/mdatagen \ -dropreplace go.opentelemetry.io/collector/component \ -dropreplace go.opentelemetry.io/collector/component/componentprofiles \ -dropreplace go.opentelemetry.io/collector/component/componentstatus \