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

[confignet] Mark as stable #9801

Merged
merged 6 commits into from
Sep 10, 2024

Conversation

TylerHelmuth
Copy link
Member

Description:
Mark confignet as Stable

Link to tracking Issue:
Closes #9045

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.23%. Comparing base (95f9cec) to head (a8d60b8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9801   +/-   ##
=======================================
  Coverage   92.23%   92.23%           
=======================================
  Files         414      414           
  Lines       19810    19810           
=======================================
  Hits        18271    18271           
  Misses       1167     1167           
  Partials      372      372           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

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

LGTM! I have reviewed the code and the test coverage, everything looks great.

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

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

I've been thinking how to reduce code duplication between TCPAddrConfig and AddrConfig, but cannot see a clean simple way. Go isn't very flexible sometimes.

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

By stabilizing this, we commit to two things from confmap:

  1. Supporting mapstructure YAML tags. I am fine with that, I don't think there is much of a point on changing it, but I know there has been some discussion about this (@atoulme may have more details?). Is this resolved?
  2. Supporting UnmarshalText on config unmarshaling. This is a standard library interface, so I think it is a pretty safe assumption.

We also commit to one thing from component:

  1. AddrConfig implements component.ConfigValidator:
    func (na *AddrConfig) Validate() error {
    . We are commiting to keep on supporting that interface.

For the implicit dependency on component, I don't really get why we are adding Validate(): the UnmarshalText method from the transport should already do validation at unmarshaling time. Shouldn't that be enough? If we can remove that method, we eliminate one implicit dependency.

@TylerHelmuth
Copy link
Member Author

I don't really get why we are adding Validate()

@mx-psi I believe Validate() should be included since AddrConfig.Transport is a public field. Users are able to set AddrConfig.Transport manually, bypassing TransportType.UnmarshalText. See #9385 (comment).

@TylerHelmuth
Copy link
Member Author

@mx-psi based on your comments it sounds like we have sufficient dependencies on component and confmap to hold off marking this stable until those 2 modules are stable.

@mx-psi
Copy link
Member

mx-psi commented Mar 26, 2024

@mx-psi based on your comments it sounds like we have sufficient dependencies on component and confmap to hold off marking this stable until those 2 modules are stable.

Or at least I think if we merge this, we should have a way to validate that we are not changing these assumptions

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Apr 10, 2024
@dmitryax dmitryax removed the Stale label Apr 17, 2024
@TylerHelmuth
Copy link
Member Author

Will reopen once component and confmap are stable

@atoulme
Copy link
Contributor

atoulme commented Aug 28, 2024

There is no dependency to component left and confmap is stable, reopening.

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

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

I think it's pretty clear that Validate is here to stay, which was the only dependency left with component. I vote we merge this.

@open-telemetry/collector-approvers I will merge this after v0.109.0 is released unless somebody blocks the PR

@mx-psi mx-psi merged commit 4bd3db7 into open-telemetry:main Sep 10, 2024
49 checks passed
bogdandrutu added a commit that referenced this pull request Sep 10, 2024
bogdandrutu added a commit that referenced this pull request Sep 10, 2024
Reverts #9801

To unblock the release of the collector-contrib, will re-land after.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Stabilize module confignet
8 participants