Skip to content

Commit

Permalink
[chore] Fix update-otel (open-telemetry#37706)
Browse files Browse the repository at this point in the history
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR fixed `make update-otel` to update `builder-config.yaml`
correctly. This is the workflow we update `builder-config.yaml` files:
1. `MULTIMOD` command to update `go.mod`
2. `updatehelper` function to update `builder-config.yaml` according to
the updated `go.mod`

However, `make otelcontribcol/make oteltestbedcol` will overwrite the
updated `go.mod` unexpectedly before step 2.
This PR removes the unexpected `make otelcontribcol/make oteltestbedcol`
commands.

cc @mx-psi 
<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
n/a

<!--Describe what testing was performed and which tests were added.-->
#### Testing
n/a

<!--Describe the documentation added.-->
#### Documentation
n/a

<!--Please delete paragraphs that you did not use before submitting.-->
  • Loading branch information
sincejune authored Feb 7, 2025
1 parent 769c4c9 commit 499df64
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -423,18 +423,17 @@ endef

.PHONY: update-otel
update-otel:$(MULTIMOD)
# Make sure cmd/otelcontribcol/go.mod and cmd/oteltestbedcol/go.mod are present
$(MAKE) genotelcontribcol
$(MAKE) genoteltestbedcol
$(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m stable --commit-hash $(OTEL_STABLE_VERSION)
git add . && git commit -s -m "[chore] multimod update stable modules" ; \
$(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m beta --commit-hash $(OTEL_VERSION)
git add . && git commit -s -m "[chore] multimod update beta modules" ; \
$(MAKE) gotidy
# Ensure the otelcontribcol is generated, update deps, then
$(MAKE) genotelcontribcol
$(call updatehelper,$(CORE_VERSIONS),./cmd/otelcontribcol/go.mod,./cmd/otelcontribcol/builder-config.yaml)
$(MAKE) genotelcontribcol
# Ensure the otelcontribcol is generated.
$(MAKE) genoteltestbedcol
$(call updatehelper,$(CORE_VERSIONS),./cmd/oteltestbedcol/go.mod,./cmd/oteltestbedcol/builder-config.yaml)
$(MAKE) genotelcontribcol
$(MAKE) genoteltestbedcol
$(MAKE) generate
$(MAKE) crosslink
Expand Down

0 comments on commit 499df64

Please sign in to comment.