Skip to content
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

Use Option pattern for componenthelper #2778

Merged
merged 2 commits into from
Mar 24, 2021

Conversation

bogdandrutu
Copy link
Member

Signed-off-by: Bogdan Drutu [email protected]

@bogdandrutu bogdandrutu requested a review from a team March 23, 2021 23:29
@codecov
Copy link

codecov bot commented Mar 23, 2021

Codecov Report

Merging #2778 (7d908f7) into main (b78ff24) will increase coverage by 0.00%.
The diff coverage is 96.55%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2778   +/-   ##
=======================================
  Coverage   91.71%   91.71%           
=======================================
  Files         293      293           
  Lines       15609    15614    +5     
=======================================
+ Hits        14316    14321    +5     
+ Misses        887      886    -1     
- Partials      406      407    +1     
Impacted Files Coverage Δ
component/componenttest/nop_exporter.go 100.00% <ø> (ø)
component/componenttest/nop_extension.go 100.00% <ø> (ø)
component/componenttest/nop_processor.go 100.00% <ø> (ø)
component/componenttest/nop_receiver.go 100.00% <ø> (ø)
internal/testcomponents/example_extension.go 88.88% <0.00%> (ø)
component/componenthelper/component.go 100.00% <100.00%> (ø)
exporter/exporterhelper/common.go 100.00% <100.00%> (ø)
processor/processorhelper/processor.go 100.00% <100.00%> (ø)
receiver/scraperhelper/scraper.go 100.00% <100.00%> (ø)
testutil/testutil.go 81.60% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b78ff24...7d908f7. Read the comment docs.

@bogdandrutu bogdandrutu force-pushed the componenthelper branch 2 times, most recently from d952987 to 9761974 Compare March 23, 2021 23:44
component/componenthelper/component.go Outdated Show resolved Hide resolved
component/componenthelper/component.go Outdated Show resolved Hide resolved
component/componenthelper/component.go Outdated Show resolved Hide resolved
component/componenthelper/component.go Outdated Show resolved Hide resolved
@@ -25,7 +25,7 @@ import (
"go.opentelemetry.io/collector/config/configmodels"
)

// ComponentSettings for timeout. The timeout applies to individual attempts to send data to the backend.
// Settings for timeout. The timeout applies to individual attempts to send data to the backend.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go lint has yelled at me enough times I've internalized that godoc should start with TimeoutSettings, though not sure how to reword this doing so and it seems that this already was deviating from that guidance. v0v

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what we missed in the config that this is not picked by lint. Will look into this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also was done unintentionally by the IDE because I renamed ComponentSettings -> Settings initially and text was also replaced

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently it was disabled, starting to enable bunch of these #2786 will take a bit to fix all errors.

exporter/exporterhelper/common.go Show resolved Hide resolved
@tigrannajaryan
Copy link
Member

Has a merge conflict.

@bogdandrutu bogdandrutu merged commit 4ae0fc1 into open-telemetry:main Mar 24, 2021
@bogdandrutu bogdandrutu deleted the componenthelper branch March 24, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants