-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Builder] Add package option to support generating library (non-main) Go packages and improve build logging #13296
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
Conversation
|
This should be tested. |
Added two improvements in the unit tests:
|
# Conflicts: # cmd/builder/internal/config/default.yaml
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (72.72%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #13296 +/- ##
=======================================
Coverage 91.57% 91.58%
=======================================
Files 529 530 +1
Lines 31460 31474 +14
=======================================
+ Hits 28811 28826 +15
+ Misses 2083 2080 -3
- Partials 566 568 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @dmathieu |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
# Conflicts: # cmd/builder/internal/config/default.yaml
|
Hello @dmathieu, I've encountered two issues: I fixed the problem where compiled Windows files were missing the .exe extension. However, since Codecov runs on Ubuntu, these lines are actually being tested, but Codecov still shows them as uncovered. Is it possible to skip this issue and force the merge? |
|
Codecov issues are not a blocker. You can ignore them. |
|
Hello @dmathieu, |
|
Hello @dmathieu, There are two CI errors remaining: builder-snapshot and spell-check. It seems that spell-check is checking all the YAML files. Do I need to fix both of these errors before I can merge the code? |
|
The spellcheck is fine. We currently have issues with it and golangci.yml. |
Hello @dmathieu, I've noticed that the snapshot build is consistently failing, as seen in #13493 and #13494. It appears the issue is related to the "Copy release files" step—specifically, the .git directory is not being copied. For this PR, I suggest we ignore the snapshot error. I will create a new PR to fix the snapshot build issue. However, in order to debug this further, I am unable to manually trigger the CI. Could someone with the required permissions please help re-run the workflow for me? Thank you! |
I’ve already created a PR to fix the issue of the snapshot builder being blocked. Hopefully, it will be merged soon! |
# Conflicts: # cmd/builder/internal/config/default.yaml
|
hello @dmathieu |
|
hello @dmathieu, |
|
This PR hasn't been approved yet, so no it can't be merged. |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
This pull request has become stale, and there is no clear process in place to indicate it will be approved, so I have decided to close it. |
Description
This PR adds a new package option to the builder configuration, allowing the generated OpenTelemetry Collector sources to use a custom package name instead of main. When the package is set to a value other than main, the build process is updated to recognize that the output is intended as a Go library for import by other Go modules, rather than an executable binary.
Logging is improved to provide clear messaging about this build mode.
Link to tracking issue
Fixes #
Testing
Documentation
Added documentation for the new package option in the example builder configuration and usage docs.
Clarified build output expectations when using non-main packages.