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

[component] component.go - Document what errors factoryFuncs can return #9323

Closed
atoulme opened this issue Jan 20, 2024 · 0 comments · Fixed by #10684
Closed

[component] component.go - Document what errors factoryFuncs can return #9323

atoulme opened this issue Jan 20, 2024 · 0 comments · Fixed by #10684

Comments

@atoulme
Copy link
Contributor

atoulme commented Jan 20, 2024

For component implementers, it would be good to document what and when a factoryFunc may return an error.

It seems like that ErrDataTypeIsNotSupported is explicitly called out as a potential error that can be reported. Instead of returning this error, can factoryFuncs return nil instead?

From lifecycle tests, we know ideally factoryFuncs should stay away from running validation of config or environment. Can we document this explicitly?

@atoulme atoulme self-assigned this Jul 21, 2024
mx-psi pushed a commit that referenced this issue Jul 23, 2024
#### Description
Document factory functions to mention what error can be reported if the
signal is not supported.

#### Link to tracking issue
Fixes #9323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants