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

Investigate alternative for Unmarshaler and Marshaler #7101

Closed
bogdandrutu opened this issue Feb 3, 2023 · 1 comment · Fixed by #9750
Closed

Investigate alternative for Unmarshaler and Marshaler #7101

bogdandrutu opened this issue Feb 3, 2023 · 1 comment · Fixed by #9750
Labels
release:required-for-ga Must be resolved before GA release

Comments

@bogdandrutu
Copy link
Member

bogdandrutu commented Feb 3, 2023

The Unmarshaler because of the Unmarshal definition, has an issue when recursively unmarshal other structs that implement the Unmarshaler, see #6029 where the "given" destination to Conf.Unmarshal cannot be checked against the Unmarshaler implementation to avoid a deadlock. The Marshaler seem to not have (I did not carefully check) the same problem, but this needs to be confirmed.

Some possible solutions:

  • See yaml.v2 interfaces, they seem to work fine. We may want to switch to that.
  • Ignore this issue, document properly in the Conf.Unmarshal the caveat.
@mx-psi
Copy link
Member

mx-psi commented Mar 18, 2024

#9750 would remove this caveat from Conf.Unmarshal, solving this.

@mx-psi mx-psi closed this as completed in 9a21643 May 29, 2024
steves-canva pushed a commit to Canva/opentelemetry-collector that referenced this issue Jun 14, 2024
**Description:**
This PR removes the top level if/else in `component.UnmarshalConfig`,
handling recursive state in the confmap.Conf object instead.
This PR deprecates `component.UnmarshalConfig` in favor of calling
directly `Unmarshal` on the confmap.Conf object.

**Link to tracking Issue:**
Fixes open-telemetry#7102
Fixes open-telemetry#7101

---------

Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:required-for-ga Must be resolved before GA release
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants