You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate replaces automatically in builder-integration-test (#11793)
This PR removes the manually maintained `replace` statements in
`cmd/builder/test/core.builder.yaml` and generates them automatically in
`cmd/builder/test/test.sh`. This ensures that the builder integration
test properly uses the local version of core collector modules, even if
a `replace` statement is forgotten. This is especially important in
release PRs where dependencies have not-yet-valid version numbers (see
tracking issue for context).
I believe a better implementation of this long-term may be to commit a
`go.work` file to the repository as the single source of truth for
`replace`s, and let the `go` commands run by `ocb` take it into account
automatically. (This would also avoid needing to maintain the `replace`s
in every `go.mod`, which can be annoying when `make crosslink` is not
sufficient.) But as there were [objections the last time this was
discussed](open-telemetry/opentelemetry-collector-contrib#21972 (comment)),
I decided to leave this as a future discussion.
Fixes#11607
We can simulate a Release PR by setting the `exporter` import in
`debugexporter` to an invalid version like `0.999.0`. With the new
script, this causes no problems, showing that the build uses the local
version without fetching from the proxy. Filtering the `exporter` module
from the replace statements by adding this to the script:
```bash
core_mods=$(echo "$core_mods" | grep -v "/exporter$")
```
makes `ocb` output the expected `unknown revision` error.
0 commit comments