Skip to content

Commit

Permalink
Add mdatagen replace option to check-contrib target (#11223)
Browse files Browse the repository at this point in the history
#### 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>
  • Loading branch information
PrateekKumar1709 authored Sep 25, 2024
1 parent 368cdd0 commit 7589901
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit 7589901

Please sign in to comment.