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

Closed

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 91.04%. Comparing base (b34f535) to head (9ac5a9f).
Report is 71 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9801      +/-   ##
==========================================
+ Coverage   91.02%   91.04%   +0.01%     
==========================================
  Files         353      353              
  Lines       18704    18712       +8     
==========================================
+ Hits        17026    17036      +10     
+ Misses       1350     1348       -2     
  Partials      328      328              

☔ 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

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.

Stabilize module confignet
5 participants