Skip to content

Commit

Permalink
[chore] Generate replaces automatically in otelcontribcol/oteltestb…
Browse files Browse the repository at this point in the history
…edcol (#37569)

#### Description
`cmd/otelcontribcol/builder-config.yaml` currently contains numerous
`replaces` directives. These are important for making sure that builds
use the local version of the code and not one fetched from the Go proxy,
especially during the release process when internal dependencies are set
to versions that have not been published yet. To avoid needing to
maintain this list of directives manually, this PR removes them from
`builder-config.yaml` and adds a script which creates
`builder-config-replaced.yaml` by appending `replaces` directives for
every module in the repository. (Some may be superfluous, but that
should not cause problems.)

#### Link to tracking issue
Fixes #37243

#### Testing
I ran the release script locally and no errors occurred in
`genotelcontribcol` or `gentestbedcol`.
  • Loading branch information
jade-guiton-dd authored Jan 30, 2025
1 parent 4fc2fb6 commit 800e0ca
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 322 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ chlog-update: $(CHLOGGEN)

.PHONY: genotelcontribcol
genotelcontribcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config.yaml
./internal/buildscripts/ocb-add-replaces.sh otelcontribcol
$(BUILDER) --skip-compilation --config cmd/otelcontribcol/builder-config-replaced.yaml

# Build the Collector executable.
.PHONY: otelcontribcol
Expand All @@ -356,7 +357,8 @@ otelcontribcollite: genotelcontribcol

.PHONY: genoteltestbedcol
genoteltestbedcol: $(BUILDER)
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config.yaml
./internal/buildscripts/ocb-add-replaces.sh oteltestbedcol
$(BUILDER) --skip-compilation --config cmd/oteltestbedcol/builder-config-replaced.yaml

# Build the Collector executable, with only components used in testbed.
.PHONY: oteltestbedcol
Expand Down
Loading

0 comments on commit 800e0ca

Please sign in to comment.