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

[configtls] Rename config structs for consistency #9495

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

arjunmahishi
Copy link
Contributor

Description:

Simply renames a few structs in the configtls package for consistence.

TLSClientSetting to ClientConfig
TLSServerSetting to ServerConfig
TLSSetting to Config

Link to tracking Issue:

Fixes #9474

@arjunmahishi arjunmahishi requested review from a team and jpkrohling February 6, 2024 19:22
@arjunmahishi
Copy link
Contributor Author

arjunmahishi commented Feb 6, 2024

I just ran this:

 rg "TLSClientSetting" -l --type go | xargs -I{} sh -c "gsed -i 's/TLSClientSetting/ClientConfig/g' {}"
 rg "TLSServerSetting" -l --type go | xargs -I{} sh -c "gsed -i 's/TLSServerSetting/ServerConfig/g' {}"
 rg "TLSSetting" -l --type go | xargs -I{} sh -c "gsed -i 's/TLSSetting/Config/g' {}"

Will take care of any tests that fail (not expecting anything to fail though).

@arjunmahishi arjunmahishi force-pushed the rename-config-structs branch from b08a147 to 49a29fc Compare February 6, 2024 19:58
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.89%. Comparing base (b808e85) to head (848514f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9495   +/-   ##
=======================================
  Coverage   90.89%   90.89%           
=======================================
  Files         347      347           
  Lines       18324    18324           
=======================================
  Hits        16655    16655           
  Misses       1344     1344           
  Partials      325      325           

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

Copy link
Contributor

@evan-bradley evan-bradley left a comment

Choose a reason for hiding this comment

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

Thanks for taking this. We'll need to transition from the old types to the new ones, so there will have to be a little bit of duplication meanwhile.

.chloggen/rename_configtls_structs.yaml Outdated Show resolved Hide resolved
.chloggen/rename_configtls_structs.yaml Outdated Show resolved Hide resolved
config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
@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
@arjunmahishi arjunmahishi force-pushed the rename-config-structs branch 2 times, most recently from 88dfcf1 to 6df20bc Compare February 7, 2024 18:21
config/configgrpc/configgrpc.go Show resolved Hide resolved
@jpkrohling jpkrohling changed the title [configtls] Rename config structs for consistancy [configtls] Rename config structs for consistency Feb 15, 2024
@arjunmahishi
Copy link
Contributor Author

Can this be merged? or am I missing a step?

@TylerHelmuth TylerHelmuth added the ready-to-merge Code review completed; ready to merge by maintainers label Feb 16, 2024
@TylerHelmuth
Copy link
Member

@arjunmahishi please take a look at the conflict.

This commit renames the following structs:

  * TLSClientSetting to ClientConfig
  * TLSServerSetting to ServerConfig
  * TLSSetting to Config

This is based on the naming convention followed in other config
packages.

Fixes open-telemetry#9474
@arjunmahishi
Copy link
Contributor Author

@arjunmahishi please take a look at the conflict.

Done

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.

LGTM, just minor asks

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
Copy link
Member

Choose a reason for hiding this comment

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

Can you please list all the renames here, e.g.:

Suggested change
subtext:
subtext: |
- TLSClientSetting -> ClientConfig

config/configtls/configtls.go Show resolved Hide resolved
config/configtls/configtls.go Show resolved Hide resolved
@dmitryax dmitryax merged commit 9a83b0a into open-telemetry:main Feb 29, 2024
46 checks passed
@github-actions github-actions bot added this to the next release milestone Feb 29, 2024
@arjunmahishi arjunmahishi deleted the rename-config-structs branch February 29, 2024 05:27
codeboten pushed a commit that referenced this pull request Apr 15, 2024
Adds new `NewDefault*` funcs for all 3 config structs. 

In anticipation of the name changes from
#9495 I've
named the functions using the new, preferred name.

Closes #9657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge Code review completed; ready to merge by maintainers release:required-for-ga Must be resolved before GA release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[configtls] Rename configuration structs to end in Config and remove TLS prefix
8 participants