-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release] builder integration test succeeds on main but fails on release prep #11607
Comments
The immediate problem was fixed by adding #11604, but we need a better solution to ensure these issues are caught prior to the release process. |
#### Description 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). #### Note 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. #### Link to tracking issue Fixes #11607 #### Testing 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.
reopened with #11909 |
Edit: I'm silly, of course it's going to work now that the version has been published... |
…elemetry#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 open-telemetry#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.
…elemetry#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 open-telemetry#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.
…elemetry#11793) #### Description 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). #### Note 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. #### Link to tracking issue Fixes open-telemetry#11607 #### Testing 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.
Describe the bug
When a new module was added since the last release, the
Builder - Integration tests
github action succeeds on main but fails on the release prep PR.What did you expect to see?
CI should be able to catch this issue immediately and appropriate replace statements should be required in the codebase.
What did you see instead?
The release process fails.
Is it possible to detect and require a solution to this problem at the time the module was added? What new tests or changes to existing tests are necessary to ensure releases are not blocked by this in the future?
The text was updated successfully, but these errors were encountered: