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

Added new default functions for configgrpc file #9819

Conversation

AkhigbeEromo
Copy link
Contributor

Description:
Added newDefault methods for structs in configgrpc package

Link to tracking Issue:
Closes #9654

Testing: Tests were added for the NewDefault functions

config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
@@ -90,12 +95,27 @@ type ClientConfig struct {
Auth *configauth.Authentication `mapstructure:"auth"`
}

// NewDefaultClientConfig() creates a new ClientConfig with any default values set
func NewDefaultClientConfig() *ClientConfig {
return &ClientConfig{
Copy link
Member

Choose a reason for hiding this comment

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

This needs to use `configtls.NewDefaultClientConfig once it exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Concerning this too, can i get a link to the issue that will resolve this so I can work on it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have prepared a branch that will set default functions for configtls, but an issue has to first be created. Or should i go ahead and create the issue, then link a PR for the issue? @TylerHelmuth

@@ -90,12 +95,27 @@ type ClientConfig struct {
Auth *configauth.Authentication `mapstructure:"auth"`
}

// NewDefaultClientConfig() creates a new ClientConfig with any default values set
func NewDefaultClientConfig() *ClientConfig {
return &ClientConfig{
Copy link
Member

Choose a reason for hiding this comment

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

This function will need to call configauth.NewDefaultAuthentication once it exists.

config/configgrpc/configgrpc.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.13%. Comparing base (2037527) to head (3871204).
Report is 46 commits behind head on main.

❗ Current head 3871204 differs from pull request most recent head d7f6a75. Consider uploading reports for the commit d7f6a75 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9819   +/-   ##
=======================================
  Coverage   91.12%   91.13%           
=======================================
  Files         353      353           
  Lines       18723    18742   +19     
=======================================
+ Hits        17062    17081   +19     
  Misses       1333     1333           
  Partials      328      328           

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

Copy link
Contributor

github-actions bot commented Apr 9, 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 Apr 9, 2024
@AkhigbeEromo
Copy link
Contributor Author

Hello @TylerHelmuth, is there anything i need to do?

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

@AkhigbeEromo We are waiting for #9658 to be merged

@TylerHelmuth
Copy link
Member

@AkhigbeEromo this is ready to use the configtls. NewDefault* funcs

@AkhigbeEromo
Copy link
Contributor Author

@TylerHelmuth Thank you very much, will add it now

@AkhigbeEromo
Copy link
Contributor Author

I will have to rename this PR so I do not encounter the same issues @TylerHelmuth

@AkhigbeEromo AkhigbeEromo force-pushed the Added-NewDefaultFunctions-for-`configgrpc`-file branch from d7f6a75 to e8cabb7 Compare April 15, 2024 20:23
@AkhigbeEromo AkhigbeEromo deleted the Added-NewDefaultFunctions-for-`configgrpc`-file branch April 15, 2024 20:26
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.

[configgrpc] Add NewDefault* functions for all config structs
2 participants