Skip to content

[configtls] Rename config structs for consistency - #9495

Merged
dmitryax merged 2 commits into
open-telemetry:mainfrom
arjunmahishi:rename-config-structs
Feb 29, 2024
Merged

[configtls] Rename config structs for consistency#9495
dmitryax merged 2 commits into
open-telemetry:mainfrom
arjunmahishi:rename-config-structs

Conversation

@arjunmahishi

Copy link
Copy Markdown
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

arjunmahishi commented Feb 6, 2024

Copy link
Copy Markdown
Contributor Author

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
@codecov

codecov Bot commented Feb 6, 2024

Copy link
Copy Markdown

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.

@evan-bradley evan-bradley left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .chloggen/rename_configtls_structs.yaml Outdated
Comment thread .chloggen/rename_configtls_structs.yaml Outdated
Comment thread config/configgrpc/configgrpc.go Outdated
@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
Comment thread config/configgrpc/configgrpc.go
@jpkrohling jpkrohling changed the title [configtls] Rename config structs for consistancy [configtls] Rename config structs for consistency Feb 15, 2024
@arjunmahishi

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

@arjunmahishi please take a look at the conflict.

Done

Comment thread config/configtls/configtls.go Outdated

@dmitryax dmitryax left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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

Comment thread config/configtls/configtls.go
Comment thread config/configtls/configtls.go
@dmitryax
dmitryax merged commit 9a83b0a into open-telemetry:main Feb 29, 2024
@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