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] Change Transport from string to TransportType #9385

Merged
merged 23 commits into from
Mar 15, 2024

Conversation

TylerHelmuth
Copy link
Member

@TylerHelmuth TylerHelmuth commented Jan 24, 2024

Description:
Changes Transport from a string to a new TransportType. Implements UnmarshalText for TransportType to enforce values.

This PR may be too much - it introduces a breaking change a lot of new public APIs that may not be worth it for such a small module. If we don't like the surface area this creates or the breaking change, but we still want to enforce transport type values, I think implementing Validate keeps the API footprint smaller and isn't breaking.

Link to tracking Issue:

Closes #9364

Documentation:

Added godoc comments

@TylerHelmuth TylerHelmuth requested review from a team and djaglowski January 24, 2024 17:59
@TylerHelmuth TylerHelmuth changed the title [confignet] Change Transport from string to TransportType [confignet] Change Transport from string to TransportType Jan 24, 2024
@TylerHelmuth TylerHelmuth requested a review from mx-psi January 24, 2024 18:00
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.97%. Comparing base (cc485e0) to head (21608ea).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9385   +/-   ##
=======================================
  Coverage   90.96%   90.97%           
=======================================
  Files         353      353           
  Lines       18626    18640   +14     
=======================================
+ Hits        16943    16957   +14     
  Misses       1356     1356           
  Partials      327      327           

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

@TylerHelmuth TylerHelmuth force-pushed the confignet-transport-type branch from 6408fde to 3c751a0 Compare January 24, 2024 18:46
@TylerHelmuth TylerHelmuth force-pushed the confignet-transport-type branch from afac785 to ac155b6 Compare January 29, 2024 19:32
@TylerHelmuth TylerHelmuth force-pushed the confignet-transport-type branch from ac155b6 to 68f1f55 Compare January 29, 2024 19:41
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.

IMO this PR should not make any changes that affect end users like changing the struct tags related to this.

We may consider doing the breaking change on a separate PR (personally I don't think it is worth it), but since we can consider the changes separately, I think we should keep each change on a separate PR

config/confignet/confignet_test.go Outdated Show resolved Hide resolved
config/confignet/confignet_test.go Outdated Show resolved Hide resolved
receiver/otlpreceiver/testdata/uds.yaml Outdated Show resolved Hide resolved
TylerHelmuth and others added 3 commits February 2, 2024 08:27
@mx-psi mx-psi requested a review from dmitryax February 2, 2024 15:54
@mx-psi mx-psi added needed-for-1.0 release:required-for-ga Must be resolved before GA release and removed needed-for-1.0 labels Feb 7, 2024
Copy link
Contributor

github-actions bot commented Mar 6, 2024

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 Mar 6, 2024
@mx-psi mx-psi removed the Stale label Mar 6, 2024
@mx-psi
Copy link
Member

mx-psi commented Mar 6, 2024

@bogdandrutu This is waiting on your review

@TylerHelmuth
Copy link
Member Author

All tests are now passing except Contrib, which I'll fixed after this is merged should we choose to go forward with this breaking change approach.

@mx-psi mx-psi merged commit e70b5ab into open-telemetry:main Mar 15, 2024
33 of 47 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 15, 2024
@TylerHelmuth TylerHelmuth deleted the confignet-transport-type branch March 15, 2024 14:09
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
None yet
Development

Successfully merging this pull request may close these issues.

[confignet] Should the two structs implement ConfigValidator?
4 participants