-
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
Add a default build configuration to ocb. #5752
Conversation
1034358
to
a390ad2
Compare
Codecov ReportBase: 91.89% // Head: 91.90% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #5752 +/- ##
==========================================
+ Coverage 91.89% 91.90% +0.01%
==========================================
Files 213 200 -13
Lines 13357 12414 -943
==========================================
- Hits 12274 11409 -865
+ Misses 862 793 -69
+ Partials 221 212 -9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to add a new happy-path test to test/test.sh
to test this new functionality? It would be good to have a test that verifies the ocb can be run without a config.
// configuration file. This is the same configuration that otelcorecol is | ||
// built with. | ||
func DefaultProvider() koanf.Provider { | ||
return fs.Provider(configs, "default.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use FS here or could we use file.Provider instead? I ask bc Fs is listed as experimental still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is it marked experimental?
https://pkg.go.dev/github.com/knadh/koanf@v1.4.2/providers/fs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it marked experimental on the github page: https://github.com/knadh/koanf#bundled-providers. That particular line hasn't been updated in 13 months, so could be out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. I was looking at the source and godoc, which doesn't mention experimental status. We can switch to the file provider, but the code needed for that will be basically the same as the fs one, so I don't think there's much benefit.
a390ad2
to
d53e564
Compare
Done
|
Pretty sure that this PR doesn't break contrib-tests. |
I just restarted the failed job. If it fails, please try rebasing this PR, as there might be some incompatibility problem not caused by this PR but fixed in the main branch already (on either side). |
d53e564
to
30bfaa0
Compare
PR rebased. |
30bfaa0
to
74a3f94
Compare
|
The failure is related to #5770 |
e9e3c44
to
08f3c67
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but the versions need to be bumped.
08f3c67
to
6fe7145
Compare
Updated |
6fe7145
to
dfc3d9e
Compare
CHANGELOG.md
Outdated
- `ocb` now exits with an error if it fails to load the build configuration. (#5731) | ||
- Deprecate `HTTPClientSettings.ToClientWithHost` (#5737) | ||
- Deprecate `HTTPClientSettings.ToClientWithHost`. (#5737) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confused about these changes...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just making the formatting consistent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split them in a separate PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reverted and rebased
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rebase this again. Is it ready to merge when I do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebases 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bogdandrutu, I believe this PR is pending on your side. Would you be able to review/merge this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be your side as well, we should not have "refactoring, formatting" changes in the same PR. I sent a separate PR #6012
4443611
to
5eeee8b
Compare
17f982e
to
9a7dcfd
Compare
@jpkrohling can you document the motivation? Does not seem to be that useful to produce a standard collector that we already produce and release anyway? |
Originally, when you ran ocb with no configuration, it generated a collector with no plugins, which was completely useless (see my other PR which adds a way to know what plugins you have included in the collector). The original documentation for all this claimed that ocb would produce a "default collector" when run without any arguments, and this PR restores that claim, so users can build the default collector. |
Embed the build configuration that is used to build otelcorecol into ocb so that end users can easily generate a useful collector. This makes the `--config` flag optional again. Signed-off-by: James Peach <jpeach@cloudflare.com>
9a7dcfd
to
b52d1b5
Compare
@open-telemetry/collector-approvers is this ready to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I can't merge.
@bogdandrutu, could you review and merge this if you think it's ready?
Description:
Embed the build configuration that is used to build otelcorecol into ocb
so that end users can easily generate a useful collector. This makes the
--config
flag optional again.Link to tracking Issue:
None.
Testing:
Documentation:
None.