-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(core,server): make commands not rely on server context #20422
Conversation
…io/cosmos-sdk into hieu/simplify_server_ctx
…io/cosmos-sdk into hieu/simplify_server_ctx
WalkthroughWalkthroughThe changes primarily involve replacing the usage of the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant CLI
participant Viper
participant Logger
participant Config
User ->> CLI: Execute Command
CLI ->> Viper: Initialize Viper
CLI ->> Logger: Initialize Logger
CLI ->> Config: Get Configuration
Config -->> CLI: Return Configuration
CLI ->> User: Display Output
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range and nitpick comments (1)
server/util.go (1)
Line range hint
231-316
: Review error handling and configuration management ininterceptConfigs
.The function
interceptConfigs
handles various configuration-related tasks but lacks comprehensive error handling and logging. Consider adding more detailed error messages and logging to help diagnose issues.- return fmt.Errorf("failed to read in %s: %w", cmtCfgFile, err) + log.Error("failed to read configuration file", "file", cmtCfgFile, "error", err) + return fmt.Errorf("failed to read in configuration file %s: %w", cmtCfgFile, err)
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (4)
- client/cmd.go (2 hunks)
- core/context/server_context.go (1 hunks)
- server/start.go (22 hunks)
- server/util.go (10 hunks)
Files skipped from review as they are similar to previous changes (1)
- core/context/server_context.go
Additional Context Used
Path-based Instructions (3)
client/cmd.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.server/util.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.server/start.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (20)
client/cmd.go (1)
408-416
: Optimize error handling inGetConfigFromViper
.The function
GetConfigFromViper
handles errors by returning a default configuration with the root directory set. However, it might be more appropriate to also log the error or throw it back to the caller to handle it, as swallowing the error might hide underlying issues.- return cmtcfg.DefaultConfig().SetRoot(rootDir) + return nil, fmt.Errorf("failed to unmarshal configuration: %w", err)server/util.go (1)
Line range hint
211-221
: Use custom types for context keys to avoid potential collisions.Using built-in types like
string
as keys for context values can lead to collisions. Define custom types forLoggerContextKey
andViperContextKey
to avoid this issue.- cmd.SetContext(context.WithValue(cmdCtx, corectx.LoggerContextKey, logger)) - cmd.SetContext(context.WithValue(cmdCtx, corectx.ViperContextKey, viper)) + type loggerKey struct{} + type viperKey struct{} + cmd.SetContext(context.WithValue(cmdCtx, loggerKey{}, logger)) + cmd.SetContext(context.WithValue(cmdCtx, viperKey{}, viper))server/start.go (18)
35-35
: Added import forviper
,log
, andpruningtypes
fromcosmossdk.io
.This change aligns with the PR's objective to refactor the configuration management by using
viper
and enhancing logging with thelog
package.
117-121
: RefactoredContext
struct to useviper.Viper
andlog.Logger
instead ofserver.Context
.This change is consistent with the PR's goal to remove
server.Context
and use more modular components likeviper
for configuration andlog
for logging.
130-130
: UpdatedPostSetup
,PostSetupStandalone
, andStartCommandHandler
function signatures inStartCmdOptions
to useviper
andlogger
.These changes are necessary to pass the new
viper
andlogger
instances through the application's setup and runtime, replacing the old context system.Also applies to: 132-132, 136-136
187-189
: Introduced local variablesviper
andlogger
by extracting them from the command context.This is a direct application of the new configuration and logging approach, ensuring that each command handler can access these settings directly.
205-206
: Wrapped theStartCommandHandler
call withinwrapCPUProfile
to manage CPU profiling based on theviper
configuration.This encapsulation ensures that CPU profiling is handled correctly and only when specified, improving the performance and configurability of the application.
209-214
: Added structured logging for the shutdown process, providing clear start and completion messages.Enhanced logging provides better visibility into the application's state during shutdown, which is crucial for debugging and monitoring.
Line range hint
225-247
: Refactoredstart
,startStandAlone
, andstartInProcess
functions to use the newviper
andlogger
.These changes are essential for integrating the new configuration and logging mechanisms throughout the application's startup processes.
Line range hint
250-291
: UpdatedstartStandAlone
andstartAPIServer
functions to utilizeviper
for configuration andlogger
for logging.The use of
viper
andlogger
in these functions aligns with the overall architectural shift towards better modularity and separation of concerns.
297-304
: Enhanced error handling and logging in the standalone post-setup process.This improvement ensures that errors during the post-setup phase are logged appropriately, aiding in troubleshooting and maintaining system stability.
Line range hint
318-364
: RefactoredstartInProcess
to integrateviper
andlogger
, and handle gRPC-only mode based on configuration.This refactoring supports conditional startup modes (like gRPC-only) and integrates the new configuration system, enhancing flexibility and maintainability.
Line range hint
379-396
: UpdatedstartCmtNode
to useviper
andlogger
, aligning with the new configuration and logging strategy.This update is crucial for ensuring that node startup is managed with the latest configuration and logging practices, providing better control and observability.
415-416
: RefactoredgetAndValidateConfig
to useviper
, streamlining configuration management.This change simplifies configuration handling by centralizing it in
viper
, making the code cleaner and more maintainable.
Line range hint
492-529
: Enhanced gRPC server startup to useviper
andlogger
, improving configuration and logging during server initialization.This enhancement ensures that the gRPC server is started with the correct settings and that its activity is logged appropriately, which is vital for operational monitoring and debugging.
Line range hint
549-561
: UpdatedstartAPIServer
to useviper
for configuration and enhanced logging for API server operations.These updates are consistent with the PR's objectives to improve configuration management and logging, ensuring that the API server operates with the latest settings and provides detailed operational logs.
583-601
: Refined CPU profiling setup and teardown processes to be managed viaviper
and include detailed logging.This refinement ensures that CPU profiling is configurable and that its lifecycle is well-documented through logs, aiding in performance tuning and issue resolution.
628-664
: UpdatedgetCtx
andstartApp
to useviper
andlogger
, aligning with the new configuration and logging framework.These updates are crucial for ensuring that the application context and startup processes are managed with the latest practices, enhancing clarity and control.
Line range hint
707-753
: Introduced changes in theInPlaceTestnetCreator
function to utilizeviper
andlogger
for configuration and logging.This integration ensures that the testnet creation process is configurable and well-logged, aligning with the new architectural direction of using
viper
andlog
.
Line range hint
776-834
: Refactoredtestnetify
function to useviper
for configuration management andlogger
for logging, enhancing the testnet setup process.This refactoring improves the configurability and observability of the testnet setup process, making it more robust and easier to manage.
client/cmd.go
Outdated
func GetViperFromCmd(cmd *cobra.Command) *viper.Viper { | ||
value := cmd.Context().Value(corectx.ViperContextKey) | ||
v, ok := value.(*viper.Viper) | ||
if !ok { | ||
return viper.New() | ||
} | ||
return v | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure proper error handling when retrieving Viper instance from command context.
The function GetViperFromCmd
returns a new Viper instance if it cannot find one in the command context. This might lead to unexpected behavior if the context was supposed to already contain a specific configuration. Consider throwing an error or logging a warning when the Viper instance is not found.
- if !ok {
- return viper.New()
- }
+ if !ok {
+ return nil, fmt.Errorf("viper instance not found in command context")
+ }
Committable suggestion was skipped due low confidence.
client/cmd.go
Outdated
func GetLoggerFromCmd(cmd *cobra.Command) log.Logger { | ||
v := cmd.Context().Value(corectx.LoggerContextKey) | ||
logger, ok := v.(log.Logger) | ||
if !ok { | ||
return log.NewLogger(cmd.OutOrStdout()) | ||
} | ||
return logger | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure consistent error handling in GetLoggerFromCmd
.
Similar to GetViperFromCmd
, the function GetLoggerFromCmd
creates a new logger if it cannot find one in the command context. This could lead to inconsistent logging behavior. Consider returning an error if the logger is not found.
- if !ok {
- return log.NewLogger(cmd.OutOrStdout())
- }
+ if !ok {
+ return nil, fmt.Errorf("logger not found in command context")
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
func GetLoggerFromCmd(cmd *cobra.Command) log.Logger { | |
v := cmd.Context().Value(corectx.LoggerContextKey) | |
logger, ok := v.(log.Logger) | |
if !ok { | |
return log.NewLogger(cmd.OutOrStdout()) | |
} | |
return logger | |
} | |
func GetLoggerFromCmd(cmd *cobra.Command) (log.Logger, error) { | |
v := cmd.Context().Value(corectx.LoggerContextKey) | |
logger, ok := v.(log.Logger) | |
if !ok { | |
return nil, fmt.Errorf("logger not found in command context") | |
} | |
return logger, nil | |
} |
client/cmd.go
Outdated
func GetConfigFromCmd(cmd *cobra.Command) *cmtcfg.Config { | ||
v := cmd.Context().Value(corectx.ViperContextKey) | ||
viper, ok := v.(*viper.Viper) | ||
if !ok { | ||
return cmtcfg.DefaultConfig() | ||
} | ||
return GetConfigFromViper(viper) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review error handling strategy in GetConfigFromCmd
.
The function GetConfigFromCmd
returns a default configuration when it fails to retrieve the Viper instance from the command context. This could mask configuration errors. It might be more appropriate to return an error to the caller.
- if !ok {
- return cmtcfg.DefaultConfig()
- }
+ if !ok {
+ return nil, fmt.Errorf("failed to retrieve viper instance from command context")
+ }
Committable suggestion was skipped due low confidence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (11)
- client/cmd.go (2 hunks)
- core/context/server_context.go (1 hunks)
- server/cmd/execute.go (2 hunks)
- server/util.go (10 hunks)
- server/util_test.go (15 hunks)
- simapp/simd/cmd/testnet_test.go (4 hunks)
- tests/e2e/genutil/export_test.go (5 hunks)
- x/genutil/client/cli/export_test.go (3 hunks)
- x/genutil/client/cli/genaccount_test.go (4 hunks)
- x/genutil/client/cli/init_test.go (16 hunks)
- x/genutil/client/testutil/helpers.go (2 hunks)
Files skipped from review as they are similar to previous changes (10)
- client/cmd.go
- core/context/server_context.go
- server/cmd/execute.go
- server/util.go
- simapp/simd/cmd/testnet_test.go
- tests/e2e/genutil/export_test.go
- x/genutil/client/cli/export_test.go
- x/genutil/client/cli/genaccount_test.go
- x/genutil/client/cli/init_test.go
- x/genutil/client/testutil/helpers.go
Additional Context Used
Path-based Instructions (1)
server/util_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
Additional comments not posted (12)
server/util_test.go (12)
19-21
: Imports updated to usecosmossdk.io/core/context
andcosmossdk.io/log
instead of theserver
package.This change aligns with the PR's objective to refactor context handling by removing dependencies on the
server
package and using more specific packages for context and logging.
147-148
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
187-188
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
217-218
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
255-256
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
364-365
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
382-383
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
400-401
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
418-419
: Repeated issue: Use of empty struct keys incontext.WithValue
.Refer to the previous comment on lines 65-66 for the suggested fix.
449-451
: Use oflog.NewNopLogger()
in test setup.This is a good practice in tests where logging output is not necessary, as it prevents cluttering the test output.
465-468
: Proper use of context values in test setup.This segment correctly sets multiple context values which are essential for the test's configuration and logging. Good use of context to pass necessary data.
486-491
: Ensure error handling is robust in configuration interception.It's crucial to have tests that cover error paths to ensure that the application behaves correctly under failure conditions.
Verification successful
The tests in
server/util_test.go
do cover various scenarios forInterceptConfigsPreRunHandler
, which callsInterceptConfigsAndCreateContext
. Additionally, theTestInterceptConfigsWithBadPermissions
function specifically tests for permission errors, ensuring that such errors are correctly handled.
TestInterceptConfigsPreRunHandlerCreatesConfigFilesWhenMissing
TestInterceptConfigsPreRunHandlerReadsConfigToml
TestInterceptConfigsPreRunHandlerReadsAppToml
TestInterceptConfigsPreRunHandlerReadsFlags
TestInterceptConfigsPreRunHandlerReadsEnvVars
TestInterceptConfigsPreRunHandlerPrecedenceFlag
TestInterceptConfigsPreRunHandlerPrecedenceEnvVar
TestInterceptConfigsPreRunHandlerPrecedenceConfigFile
TestInterceptConfigsPreRunHandlerPrecedenceConfigDefault
TestInterceptConfigsWithBadPermissions
These tests collectively ensure that error handling in the configuration interception process is robust.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that error handling paths in configuration interception are covered by tests. # Test: Search for tests covering error paths in configuration interception. Expect: Tests that simulate errors and check responses. rg --type go 'server.InterceptConfigsAndCreateContext'Length of output: 168
Script:
#!/bin/bash # Description: Verify that error handling paths in configuration interception are covered by tests. # Test: Search for tests covering error paths in configuration interception. Expect: Tests that simulate errors and check responses. rg --type go 'InterceptConfigsAndCreateContext.*err'Length of output: 238
Script:
#!/bin/bash # Description: Verify if error handling paths in configuration interception are covered indirectly by other tests. # Test: Search for test functions that call InterceptConfigsAndCreateContext and check their error handling. rg --type go 'InterceptConfigsAndCreateContext' -A 5Length of output: 2037
Script:
#!/bin/bash # Description: Extract the full test function from server/util_test.go to review its coverage of error handling paths. # Extract: Get the full test function that calls InterceptConfigsAndCreateContext. rg --type go -A 20 'func Test.*InterceptConfigsAndCreateContext' server/util_test.goLength of output: 86
Script:
#!/bin/bash # Description: List all test functions in server/util_test.go to identify potential indirect tests for error handling in InterceptConfigsAndCreateContext. # List: Get all test functions in server/util_test.go. rg --type go '^func Test' server/util_test.goLength of output: 837
Script:
#!/bin/bash # Description: Extract the TestInterceptConfigsPreRunHandler* and TestInterceptConfigsWithBadPermissions functions to review their coverage of error handling paths. # Extract: Get the full TestInterceptConfigsPreRunHandler* and TestInterceptConfigsWithBadPermissions functions. rg --type go -A 20 'func TestInterceptConfigsPreRunHandler|func TestInterceptConfigsWithBadPermissions' server/util_test.goLength of output: 7766
server/util_test.go
Outdated
ctx := context.WithValue(context.Background(), corectx.LoggerContextKey{}, log.NewLogger(os.Stdout)) | ||
ctx = context.WithValue(ctx, corectx.ViperContextKey{}, viper.New()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use of empty struct keys in context.WithValue
is unconventional and potentially error-prone.
- ctx := context.WithValue(context.Background(), corectx.LoggerContextKey{}, log.NewLogger(os.Stdout))
- ctx = context.WithValue(ctx, corectx.ViperContextKey{}, viper.New())
+ ctx := context.WithValue(context.Background(), corectx.LoggerContextKey, log.NewLogger(os.Stdout))
+ ctx = context.WithValue(ctx, corectx.ViperContextKey, viper.New())
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
ctx := context.WithValue(context.Background(), corectx.LoggerContextKey{}, log.NewLogger(os.Stdout)) | |
ctx = context.WithValue(ctx, corectx.ViperContextKey{}, viper.New()) | |
ctx := context.WithValue(context.Background(), corectx.LoggerContextKey, log.NewLogger(os.Stdout)) | |
ctx = context.WithValue(ctx, corectx.ViperContextKey, viper.New()) |
server/util_test.go
Outdated
v := ctx.Value(corectx.ViperContextKey{}) | ||
viper, _ := v.(*viper.Viper) | ||
|
||
if viper == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
Codebase Verification
Ensure nil checks for context values to prevent potential nil pointer dereferences.
The following instances of ctx.Value
usage need attention to ensure proper nil checks:
-
server/v2/server.go
:serverCfg := ctx.Value(ServerContextKey).(Config)
-
runtime/v2/services/transaction.go
:return ctx.Value(corecontext.ExecModeKey).(transaction.ExecMode)
-
runtime/v2/services/comet.go
:ci := ctx.Value(corecontext.CometInfoKey).(comet.Info)
-
collections/colltest/store.go
:return ctx.Value(contextStoreKey{}).(store.KVStore)
-
types/context.go
:return ctx.Value(SdkContextKey).(Context)
-
x/accounts/internal/implementation/context.go
:return ctx.Value(contextKey{}).(contextValue)
Please ensure that these instances include proper nil checks before using the retrieved values to prevent runtime panics.
Analysis chain
Check for potential nil pointer dereference when asserting type from context value.
Ensure that the viper instance retrieved from the context is checked for nil before usage to prevent runtime panics.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that there are no instances where the viper instance could be nil before being used.
# Test: Search for viper usage after being retrieved from context. Expect: Proper checks before usage.
rg --type go 'viper, _ := ctx.Value(corectx.ViperContextKey{}).(*viper.Viper)'
Length of output: 272
Script:
#!/bin/bash
# Description: Verify that there are no instances where the viper instance could be nil before being used.
# Test: Search for viper usage after being retrieved from context. Expect: Proper checks before usage.
rg --type go 'viper, _ := ctx\.Value\(corectx\.ViperContextKey\{\}\)\.\(\*viper\.Viper\)'
Length of output: 91
Script:
#!/bin/bash
# Description: Search for all instances where ctx.Value is used and inspect the handling of the retrieved values.
# Test: Search for all instances of ctx.Value usage in Go files.
rg --type go 'ctx\.Value'
Length of output: 961
Script:
#!/bin/bash
# Description: Extract and display the relevant lines of code around each instance of ctx.Value usage for manual inspection.
# Test: Display lines around each ctx.Value usage to check for nil handling.
rg --type go --context 5 'ctx\.Value'
Length of output: 7335
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have a mention of all the public api break in the changelog.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (1)
server/start.go (1)
577-595
: Review the implementation of CPU profiling.Consider encapsulating the CPU profiling setup and cleanup logic into a separate function for better code organization and reusability. This would make the
wrapCPUProfile
function cleaner and more focused on its primary responsibility.
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (2)
- server/start.go (23 hunks)
- server/util.go (10 hunks)
Files skipped from review as they are similar to previous changes (1)
- server/util.go
Additional Context Used
Path-based Instructions (1)
server/start.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (9)
server/start.go (9)
124-124
: RefactorStartCmdOptions
to useviper.Viper
andlog.Logger
instead ofserver.Context
.The changes align with the PR's objective to remove
server.Context
and use more modular components likeviper
for configuration andlog
for logging. This should enhance the maintainability and flexibility of the configuration management.Also applies to: 126-126, 130-130
Line range hint
219-241
: Refactorstart
function to useviper.Viper
andlog.Logger
.The refactoring of the
start
function to useviper
andlogger
instead ofserver.Context
is consistent with the overall goal of the PR. This change should make the function more straightforward and aligned with modern Go practices by decoupling it from a custom context implementation.
244-255
: RefactorstartStandAlone
to handle configuration and logging withviper
andlog
.The changes in
startStandAlone
function reflect the shift from using a custom server context to usingviper
for configuration andlog
for logging. This should improve the clarity and maintainability of the code.Also applies to: 258-266, 280-291, 298-305
Line range hint
312-358
: RefactorstartInProcess
to integrateviper
andlog
.The
startInProcess
function has been successfully refactored to utilizeviper
andlog
instead of the previousserver.Context
. This change supports the PR's goal of enhancing configuration management and logging capabilities within the server's operational context.
Line range hint
373-390
: UpdatestartCmtNode
to useviper
andlog
.The
startCmtNode
function now usesviper
for configuration andlog
for logging, replacing the old context-based approach. This update is in line with the PR's objectives and should help in maintaining a cleaner and more modular codebase.
409-410
: Ensure configuration and API server start-up are correctly refactored.The refactoring of configuration retrieval and validation, as well as the API server start-up, to use
viper
andlog
is well-executed. These changes are crucial for ensuring that the server's configuration management is both flexible and robust.Also applies to: 486-523, 543-555
622-626
: Refactor context and error group setup.The refactoring of the context and error group setup to be more modular and testable is a positive change. It aligns with modern Go practices and enhances the readability and maintainability of the code.
630-658
: EnsurestartApp
function correctly handles new configurations.The
startApp
function has been updated to handle configurations usingviper
. It's important to verify that these changes are well-covered by unit tests, especially given the significant refactoring involved.
181-183
: Ensure proper error handling and logging during server start-up.The refactored code properly initializes
viper
andlogger
and uses them in the start-up process. However, it's crucial to ensure that all error paths are adequately covered by tests, especially since the configuration handling has been significantly changed.Also applies to: 199-199, 203-208
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think given the internals are now changed to work smoothly with no server context, we should only remove the usage of server context in modules commands (already done here), but not in the server/ package. The notion of server context can still live in a server v0 world imho. But now with those changes, we can have better APIs for server v2 and do no rely on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range and nitpick comments (2)
server/util.go (2)
49-49
: MarkContext
struct as deprecated in the documentation.Consider adding a
@deprecated
tag in the GoDoc comment for theContext
struct to clearly indicate its deprecation status in the documentation.
246-246
: Clarify the purpose of the debug statement.The debug statement
fmt.Println("Init root", rootDir)
might be useful during development, but consider removing or replacing it with a more structured logging approach before merging to production.
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- server/util.go (4 hunks)
Additional Context Used
Path-based Instructions (1)
server/util.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Additional comments not posted (1)
server/util.go (1)
228-233
: Use custom types for context keys to avoid potential collisions.This comment is still valid as per the previous review. Using built-in types like
string
as keys for context values can lead to collisions. Define custom types forLoggerContextKey
andViperContextKey
to avoid this issue.- cmdCtx = context.WithValue(cmdCtx, corectx.ViperContextKey{}, serverCtx.Viper) - cmdCtx = context.WithValue(cmdCtx, corectx.LoggerContextKey{}, serverCtx.Logger) + type loggerKey struct{} + type viperKey struct{} + cmdCtx = context.WithValue(cmdCtx, loggerKey{}, serverCtx.Logger) + cmdCtx = context.WithValue(cmdCtx, viperKey{}, serverCtx.Viper)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (9)
- CHANGELOG.md (1 hunks)
- core/context/server_context.go (1 hunks)
- server/util.go (3 hunks)
- simapp/simd/cmd/testnet_test.go (4 hunks)
- tests/e2e/genutil/export_test.go (5 hunks)
- testutil/network/util.go (3 hunks)
- x/genutil/client/cli/init_test.go (16 hunks)
- x/genutil/client/testutil/helpers.go (2 hunks)
- x/genutil/collect_test.go (2 hunks)
Files skipped from review as they are similar to previous changes (8)
- core/context/server_context.go
- server/util.go
- simapp/simd/cmd/testnet_test.go
- tests/e2e/genutil/export_test.go
- testutil/network/util.go
- x/genutil/client/cli/init_test.go
- x/genutil/client/testutil/helpers.go
- x/genutil/collect_test.go
Additional Context Used
Markdownlint (384)
CHANGELOG.md (384)
70: Expected: 2; Actual: 4
Unordered list indentation
71: Expected: 2; Actual: 4
Unordered list indentation
75: Expected: 2; Actual: 4
Unordered list indentation
76: Expected: 2; Actual: 4
Unordered list indentation
77: Expected: 2; Actual: 4
Unordered list indentation
78: Expected: 2; Actual: 4
Unordered list indentation
83: Expected: 2; Actual: 4
Unordered list indentation
127: Expected: 2; Actual: 4
Unordered list indentation
128: Expected: 2; Actual: 4
Unordered list indentation
129: Expected: 2; Actual: 4
Unordered list indentation
133: Expected: 2; Actual: 4
Unordered list indentation
136: Expected: 2; Actual: 4
Unordered list indentation
137: Expected: 2; Actual: 4
Unordered list indentation
138: Expected: 2; Actual: 4
Unordered list indentation
145: Expected: 2; Actual: 4
Unordered list indentation
155: Expected: 2; Actual: 4
Unordered list indentation
157: Expected: 2; Actual: 4
Unordered list indentation
160: Expected: 2; Actual: 4
Unordered list indentation
179: Expected: 2; Actual: 4
Unordered list indentation
180: Expected: 2; Actual: 4
Unordered list indentation
182: Expected: 2; Actual: 4
Unordered list indentation
183: Expected: 2; Actual: 4
Unordered list indentation
215: Expected: 2; Actual: 4
Unordered list indentation
216: Expected: 2; Actual: 4
Unordered list indentation
217: Expected: 2; Actual: 4
Unordered list indentation
381: Expected: 2; Actual: 4
Unordered list indentation
384: Expected: 2; Actual: 4
Unordered list indentation
406: Expected: 2; Actual: 4
Unordered list indentation
407: Expected: 2; Actual: 4
Unordered list indentation
420: Expected: 2; Actual: 4
Unordered list indentation
452: Expected: 2; Actual: 4
Unordered list indentation
453: Expected: 2; Actual: 4
Unordered list indentation
454: Expected: 2; Actual: 4
Unordered list indentation
455: Expected: 2; Actual: 4
Unordered list indentation
457: Expected: 2; Actual: 4
Unordered list indentation
458: Expected: 2; Actual: 4
Unordered list indentation
459: Expected: 2; Actual: 4
Unordered list indentation
460: Expected: 2; Actual: 4
Unordered list indentation
474: Expected: 2; Actual: 4
Unordered list indentation
476: Expected: 2; Actual: 4
Unordered list indentation
478: Expected: 2; Actual: 4
Unordered list indentation
480: Expected: 2; Actual: 4
Unordered list indentation
483: Expected: 2; Actual: 4
Unordered list indentation
484: Expected: 2; Actual: 4
Unordered list indentation
485: Expected: 2; Actual: 4
Unordered list indentation
493: Expected: 2; Actual: 4
Unordered list indentation
494: Expected: 2; Actual: 4
Unordered list indentation
496: Expected: 2; Actual: 4
Unordered list indentation
497: Expected: 2; Actual: 4
Unordered list indentation
499: Expected: 2; Actual: 4
Unordered list indentation
500: Expected: 2; Actual: 4
Unordered list indentation
501: Expected: 2; Actual: 4
Unordered list indentation
503: Expected: 2; Actual: 4
Unordered list indentation
504: Expected: 2; Actual: 4
Unordered list indentation
512: Expected: 2; Actual: 4
Unordered list indentation
523: Expected: 2; Actual: 4
Unordered list indentation
524: Expected: 2; Actual: 4
Unordered list indentation
525: Expected: 2; Actual: 4
Unordered list indentation
531: Expected: 2; Actual: 4
Unordered list indentation
532: Expected: 2; Actual: 4
Unordered list indentation
533: Expected: 2; Actual: 4
Unordered list indentation
539: Expected: 2; Actual: 4
Unordered list indentation
555: Expected: 2; Actual: 4
Unordered list indentation
556: Expected: 2; Actual: 4
Unordered list indentation
557: Expected: 2; Actual: 4
Unordered list indentation
558: Expected: 2; Actual: 4
Unordered list indentation
559: Expected: 2; Actual: 4
Unordered list indentation
560: Expected: 2; Actual: 4
Unordered list indentation
565: Expected: 2; Actual: 4
Unordered list indentation
566: Expected: 2; Actual: 4
Unordered list indentation
567: Expected: 2; Actual: 4
Unordered list indentation
568: Expected: 2; Actual: 4
Unordered list indentation
575: Expected: 2; Actual: 4
Unordered list indentation
576: Expected: 2; Actual: 4
Unordered list indentation
577: Expected: 2; Actual: 4
Unordered list indentation
611: Expected: 2; Actual: 4
Unordered list indentation
612: Expected: 2; Actual: 4
Unordered list indentation
613: Expected: 2; Actual: 4
Unordered list indentation
614: Expected: 2; Actual: 4
Unordered list indentation
619: Expected: 2; Actual: 4
Unordered list indentation
620: Expected: 2; Actual: 4
Unordered list indentation
757: Expected: 2; Actual: 4
Unordered list indentation
900: Expected: 2; Actual: 4
Unordered list indentation
921: Expected: 2; Actual: 4
Unordered list indentation
924: Expected: 2; Actual: 4
Unordered list indentation
1006: Expected: 2; Actual: 4
Unordered list indentation
1007: Expected: 2; Actual: 4
Unordered list indentation
1008: Expected: 2; Actual: 4
Unordered list indentation
1009: Expected: 2; Actual: 4
Unordered list indentation
1010: Expected: 2; Actual: 4
Unordered list indentation
1011: Expected: 2; Actual: 4
Unordered list indentation
1108: Expected: 2; Actual: 4
Unordered list indentation
1194: Expected: 2; Actual: 4
Unordered list indentation
1240: Expected: 2; Actual: 4
Unordered list indentation
1246: Expected: 2; Actual: 4
Unordered list indentation
1247: Expected: 2; Actual: 4
Unordered list indentation
1248: Expected: 2; Actual: 4
Unordered list indentation
1249: Expected: 2; Actual: 4
Unordered list indentation
1250: Expected: 2; Actual: 4
Unordered list indentation
1251: Expected: 2; Actual: 4
Unordered list indentation
1351: Expected: 2; Actual: 4
Unordered list indentation
1476: Expected: 2; Actual: 4
Unordered list indentation
1477: Expected: 4; Actual: 8
Unordered list indentation
1478: Expected: 4; Actual: 8
Unordered list indentation
1479: Expected: 2; Actual: 4
Unordered list indentation
1480: Expected: 4; Actual: 8
Unordered list indentation
1481: Expected: 4; Actual: 8
Unordered list indentation
1482: Expected: 4; Actual: 8
Unordered list indentation
1483: Expected: 2; Actual: 4
Unordered list indentation
1486: Expected: 2; Actual: 4
Unordered list indentation
1487: Expected: 4; Actual: 8
Unordered list indentation
1488: Expected: 2; Actual: 4
Unordered list indentation
1489: Expected: 4; Actual: 8
Unordered list indentation
1490: Expected: 4; Actual: 8
Unordered list indentation
1491: Expected: 4; Actual: 8
Unordered list indentation
1740: Expected: 2; Actual: 4
Unordered list indentation
1741: Expected: 2; Actual: 4
Unordered list indentation
1742: Expected: 2; Actual: 4
Unordered list indentation
1743: Expected: 2; Actual: 4
Unordered list indentation
1744: Expected: 2; Actual: 4
Unordered list indentation
1745: Expected: 2; Actual: 4
Unordered list indentation
1855: Expected: 2; Actual: 4
Unordered list indentation
2192: Expected: 2; Actual: 4
Unordered list indentation
2193: Expected: 2; Actual: 4
Unordered list indentation
2194: Expected: 2; Actual: 4
Unordered list indentation
2197: Expected: 2; Actual: 4
Unordered list indentation
2198: Expected: 2; Actual: 4
Unordered list indentation
2199: Expected: 2; Actual: 4
Unordered list indentation
2221: Expected: 2; Actual: 4
Unordered list indentation
2222: Expected: 2; Actual: 4
Unordered list indentation
2223: Expected: 2; Actual: 4
Unordered list indentation
2224: Expected: 2; Actual: 4
Unordered list indentation
2225: Expected: 2; Actual: 4
Unordered list indentation
2233: Expected: 2; Actual: 4
Unordered list indentation
2234: Expected: 2; Actual: 4
Unordered list indentation
2235: Expected: 2; Actual: 4
Unordered list indentation
2236: Expected: 2; Actual: 4
Unordered list indentation
2237: Expected: 2; Actual: 4
Unordered list indentation
2239: Expected: 2; Actual: 4
Unordered list indentation
2240: Expected: 2; Actual: 4
Unordered list indentation
2241: Expected: 2; Actual: 4
Unordered list indentation
2568: Expected: 2; Actual: 4
Unordered list indentation
2569: Expected: 2; Actual: 4
Unordered list indentation
2570: Expected: 2; Actual: 4
Unordered list indentation
2571: Expected: 2; Actual: 4
Unordered list indentation
2572: Expected: 2; Actual: 4
Unordered list indentation
2574: Expected: 2; Actual: 4
Unordered list indentation
2576: Expected: 2; Actual: 4
Unordered list indentation
2577: Expected: 2; Actual: 4
Unordered list indentation
2578: Expected: 2; Actual: 4
Unordered list indentation
2579: Expected: 2; Actual: 4
Unordered list indentation
2580: Expected: 2; Actual: 4
Unordered list indentation
2581: Expected: 2; Actual: 4
Unordered list indentation
2583: Expected: 2; Actual: 4
Unordered list indentation
2584: Expected: 2; Actual: 4
Unordered list indentation
2585: Expected: 2; Actual: 4
Unordered list indentation
2588: Expected: 2; Actual: 4
Unordered list indentation
2589: Expected: 2; Actual: 4
Unordered list indentation
2590: Expected: 2; Actual: 4
Unordered list indentation
2591: Expected: 2; Actual: 4
Unordered list indentation
2592: Expected: 2; Actual: 4
Unordered list indentation
2595: Expected: 2; Actual: 4
Unordered list indentation
2598: Expected: 2; Actual: 4
Unordered list indentation
2601: Expected: 2; Actual: 4
Unordered list indentation
2602: Expected: 2; Actual: 4
Unordered list indentation
2605: Expected: 2; Actual: 4
Unordered list indentation
2612: Expected: 2; Actual: 4
Unordered list indentation
2613: Expected: 2; Actual: 4
Unordered list indentation
2614: Expected: 2; Actual: 4
Unordered list indentation
2615: Expected: 2; Actual: 4
Unordered list indentation
2616: Expected: 2; Actual: 4
Unordered list indentation
2618: Expected: 2; Actual: 4
Unordered list indentation
2619: Expected: 2; Actual: 4
Unordered list indentation
2620: Expected: 2; Actual: 4
Unordered list indentation
2621: Expected: 2; Actual: 4
Unordered list indentation
2622: Expected: 2; Actual: 4
Unordered list indentation
2623: Expected: 2; Actual: 4
Unordered list indentation
2624: Expected: 2; Actual: 4
Unordered list indentation
2625: Expected: 2; Actual: 4
Unordered list indentation
2626: Expected: 4; Actual: 8
Unordered list indentation
2629: Expected: 2; Actual: 4
Unordered list indentation
2630: Expected: 2; Actual: 4
Unordered list indentation
2631: Expected: 2; Actual: 4
Unordered list indentation
2632: Expected: 2; Actual: 4
Unordered list indentation
2633: Expected: 2; Actual: 4
Unordered list indentation
2634: Expected: 2; Actual: 4
Unordered list indentation
2641: Expected: 2; Actual: 4
Unordered list indentation
2642: Expected: 2; Actual: 4
Unordered list indentation
2643: Expected: 2; Actual: 4
Unordered list indentation
2644: Expected: 2; Actual: 4
Unordered list indentation
2651: Expected: 2; Actual: 4
Unordered list indentation
2653: Expected: 2; Actual: 4
Unordered list indentation
2655: Expected: 2; Actual: 4
Unordered list indentation
2656: Expected: 2; Actual: 4
Unordered list indentation
2657: Expected: 2; Actual: 4
Unordered list indentation
2658: Expected: 2; Actual: 4
Unordered list indentation
2659: Expected: 2; Actual: 4
Unordered list indentation
2660: Expected: 2; Actual: 4
Unordered list indentation
2661: Expected: 2; Actual: 4
Unordered list indentation
2662: Expected: 2; Actual: 4
Unordered list indentation
2663: Expected: 2; Actual: 4
Unordered list indentation
2664: Expected: 2; Actual: 4
Unordered list indentation
2665: Expected: 2; Actual: 4
Unordered list indentation
2666: Expected: 2; Actual: 4
Unordered list indentation
2667: Expected: 2; Actual: 4
Unordered list indentation
2668: Expected: 4; Actual: 8
Unordered list indentation
2669: Expected: 4; Actual: 8
Unordered list indentation
2670: Expected: 4; Actual: 8
Unordered list indentation
2671: Expected: 2; Actual: 4
Unordered list indentation
2672: Expected: 2; Actual: 4
Unordered list indentation
2673: Expected: 2; Actual: 4
Unordered list indentation
2674: Expected: 2; Actual: 4
Unordered list indentation
2675: Expected: 2; Actual: 4
Unordered list indentation
2676: Expected: 2; Actual: 4
Unordered list indentation
2677: Expected: 2; Actual: 4
Unordered list indentation
2678: Expected: 4; Actual: 8
Unordered list indentation
2679: Expected: 4; Actual: 8
Unordered list indentation
2680: Expected: 4; Actual: 8
Unordered list indentation
2681: Expected: 2; Actual: 4
Unordered list indentation
2683: Expected: 4; Actual: 8
Unordered list indentation
2684: Expected: 4; Actual: 8
Unordered list indentation
2686: Expected: 2; Actual: 4
Unordered list indentation
2687: Expected: 2; Actual: 4
Unordered list indentation
2688: Expected: 4; Actual: 8
Unordered list indentation
2689: Expected: 4; Actual: 8
Unordered list indentation
2690: Expected: 2; Actual: 4
Unordered list indentation
2691: Expected: 2; Actual: 4
Unordered list indentation
2692: Expected: 2; Actual: 4
Unordered list indentation
2695: Expected: 2; Actual: 4
Unordered list indentation
2696: Expected: 2; Actual: 4
Unordered list indentation
2698: Expected: 2; Actual: 4
Unordered list indentation
2699: Expected: 2; Actual: 4
Unordered list indentation
2702: Expected: 2; Actual: 4
Unordered list indentation
2703: Expected: 4; Actual: 8
Unordered list indentation
2704: Expected: 4; Actual: 8
Unordered list indentation
2705: Expected: 4; Actual: 8
Unordered list indentation
2706: Expected: 4; Actual: 8
Unordered list indentation
2707: Expected: 2; Actual: 4
Unordered list indentation
2708: Expected: 2; Actual: 4
Unordered list indentation
2709: Expected: 2; Actual: 4
Unordered list indentation
2711: Expected: 2; Actual: 4
Unordered list indentation
2712: Expected: 2; Actual: 4
Unordered list indentation
2713: Expected: 2; Actual: 4
Unordered list indentation
2719: Expected: 2; Actual: 4
Unordered list indentation
2722: Expected: 2; Actual: 4
Unordered list indentation
2728: Expected: 2; Actual: 4
Unordered list indentation
2736: Expected: 2; Actual: 4
Unordered list indentation
2737: Expected: 4; Actual: 8
Unordered list indentation
2738: Expected: 4; Actual: 8
Unordered list indentation
2739: Expected: 2; Actual: 4
Unordered list indentation
2747: Expected: 2; Actual: 4
Unordered list indentation
2754: Expected: 2; Actual: 4
Unordered list indentation
2755: Expected: 2; Actual: 4
Unordered list indentation
2762: Expected: 2; Actual: 4
Unordered list indentation
2764: Expected: 2; Actual: 4
Unordered list indentation
2768: Expected: 2; Actual: 4
Unordered list indentation
2769: Expected: 2; Actual: 4
Unordered list indentation
2771: Expected: 2; Actual: 4
Unordered list indentation
2779: Expected: 2; Actual: 4
Unordered list indentation
2781: Expected: 2; Actual: 4
Unordered list indentation
2782: Expected: 2; Actual: 4
Unordered list indentation
2788: Expected: 2; Actual: 4
Unordered list indentation
2796: Expected: 2; Actual: 4
Unordered list indentation
2797: Expected: 2; Actual: 4
Unordered list indentation
2798: Expected: 2; Actual: 4
Unordered list indentation
2799: Expected: 2; Actual: 4
Unordered list indentation
2800: Expected: 2; Actual: 4
Unordered list indentation
2801: Expected: 2; Actual: 4
Unordered list indentation
2802: Expected: 2; Actual: 4
Unordered list indentation
2803: Expected: 2; Actual: 4
Unordered list indentation
2804: Expected: 2; Actual: 4
Unordered list indentation
2805: Expected: 2; Actual: 4
Unordered list indentation
2806: Expected: 2; Actual: 4
Unordered list indentation
2807: Expected: 2; Actual: 4
Unordered list indentation
2808: Expected: 2; Actual: 4
Unordered list indentation
2809: Expected: 2; Actual: 4
Unordered list indentation
2811: Expected: 2; Actual: 4
Unordered list indentation
2812: Expected: 2; Actual: 4
Unordered list indentation
2814: Expected: 2; Actual: 4
Unordered list indentation
2815: Expected: 2; Actual: 4
Unordered list indentation
2816: Expected: 4; Actual: 8
Unordered list indentation
2817: Expected: 4; Actual: 8
Unordered list indentation
2818: Expected: 2; Actual: 4
Unordered list indentation
2819: Expected: 2; Actual: 4
Unordered list indentation
2820: Expected: 2; Actual: 4
Unordered list indentation
2821: Expected: 2; Actual: 4
Unordered list indentation
2822: Expected: 4; Actual: 8
Unordered list indentation
2823: Expected: 4; Actual: 8
Unordered list indentation
2825: Expected: 2; Actual: 4
Unordered list indentation
2826: Expected: 2; Actual: 4
Unordered list indentation
2829: Expected: 2; Actual: 4
Unordered list indentation
2830: Expected: 2; Actual: 4
Unordered list indentation
2831: Expected: 2; Actual: 4
Unordered list indentation
2832: Expected: 2; Actual: 4
Unordered list indentation
2833: Expected: 4; Actual: 8
Unordered list indentation
2834: Expected: 4; Actual: 8
Unordered list indentation
2835: Expected: 4; Actual: 8
Unordered list indentation
2836: Expected: 4; Actual: 8
Unordered list indentation
2837: Expected: 4; Actual: 8
Unordered list indentation
2838: Expected: 4; Actual: 8
Unordered list indentation
2839: Expected: 4; Actual: 8
Unordered list indentation
2840: Expected: 4; Actual: 8
Unordered list indentation
2841: Expected: 4; Actual: 8
Unordered list indentation
2842: Expected: 4; Actual: 8
Unordered list indentation
2843: Expected: 2; Actual: 4
Unordered list indentation
2844: Expected: 2; Actual: 4
Unordered list indentation
2849: Expected: 2; Actual: 4
Unordered list indentation
2850: Expected: 2; Actual: 4
Unordered list indentation
2851: Expected: 2; Actual: 4
Unordered list indentation
2852: Expected: 2; Actual: 4
Unordered list indentation
2853: Expected: 2; Actual: 4
Unordered list indentation
2854: Expected: 2; Actual: 4
Unordered list indentation
2856: Expected: 2; Actual: 4
Unordered list indentation
2858: Expected: 2; Actual: 4
Unordered list indentation
2872: Expected: 2; Actual: 4
Unordered list indentation
2873: Expected: 2; Actual: 4
Unordered list indentation
2874: Expected: 2; Actual: 4
Unordered list indentation
2879: Expected: 2; Actual: 4
Unordered list indentation
2880: Expected: 2; Actual: 4
Unordered list indentation
2881: Expected: 2; Actual: 4
Unordered list indentation
2885: Expected: 2; Actual: 4
Unordered list indentation
2886: Expected: 2; Actual: 4
Unordered list indentation
2887: Expected: 2; Actual: 4
Unordered list indentation
2888: Expected: 2; Actual: 4
Unordered list indentation
2889: Expected: 2; Actual: 4
Unordered list indentation
2890: Expected: 2; Actual: 4
Unordered list indentation
2893: Expected: 2; Actual: 4
Unordered list indentation
2894: Expected: 2; Actual: 4
Unordered list indentation
2895: Expected: 2; Actual: 4
Unordered list indentation
2896: Expected: 2; Actual: 4
Unordered list indentation
2897: Expected: 2; Actual: 4
Unordered list indentation
2898: Expected: 2; Actual: 4
Unordered list indentation
2899: Expected: 2; Actual: 4
Unordered list indentation
2900: Expected: 2; Actual: 4
Unordered list indentation
2901: Expected: 2; Actual: 4
Unordered list indentation
2903: Expected: 2; Actual: 4
Unordered list indentation
2905: Expected: 2; Actual: 4
Unordered list indentation
2907: Expected: 2; Actual: 4
Unordered list indentation
2912: Expected: 2; Actual: 4
Unordered list indentation
2913: Expected: 2; Actual: 4
Unordered list indentation
2914: Expected: 2; Actual: 4
Unordered list indentation
2915: Expected: 2; Actual: 4
Unordered list indentation
2916: Expected: 2; Actual: 4
Unordered list indentation
2917: Expected: 4; Actual: 8
Unordered list indentation
2918: Expected: 4; Actual: 8
Unordered list indentation
2919: Expected: 2; Actual: 4
Unordered list indentation
2920: Expected: 4; Actual: 8
Unordered list indentation
2921: Expected: 4; Actual: 8
Unordered list indentation
2922: Expected: 4; Actual: 8
Unordered list indentation
2923: Expected: 2; Actual: 4
Unordered list indentation
2924: Expected: 2; Actual: 4
Unordered list indentation
2925: Expected: 2; Actual: 4
Unordered list indentation
2926: Expected: 4; Actual: 8
Unordered list indentation
2927: Expected: 4; Actual: 8
Unordered list indentation
2928: Expected: 2; Actual: 4
Unordered list indentation
2929: Expected: 2; Actual: 4
Unordered list indentation
2930: Expected: 2; Actual: 4
Unordered list indentation
2931: Expected: 2; Actual: 4
Unordered list indentation
2932: Expected: 2; Actual: 4
Unordered list indentation
189: Expected: 0 or 2; Actual: 1
Trailing spaces
212: Expected: 0 or 2; Actual: 1
Trailing spaces
1658: null
Bare URL used
1688: null
Bare URL used
2635: null
Spaces inside emphasis markers
2723: null
Spaces inside emphasis markers
2725: null
Spaces inside emphasis markers
2730: null
Spaces inside emphasis markers
2732: null
Spaces inside emphasis markers
2742: null
Spaces inside emphasis markers
2744: null
Spaces inside emphasis markers
2749: null
Spaces inside emphasis markers
2757: null
Spaces inside emphasis markers
2774: null
Spaces inside emphasis markers
2776: null
Spaces inside emphasis markers
2784: null
Spaces inside emphasis markers
2790: null
Spaces inside emphasis markers
2860: null
Spaces inside emphasis markers
2863: null
Spaces inside emphasis markers
2866: null
Spaces inside emphasis markers
2868: null
Spaces inside emphasis markers
2908: null
Spaces inside emphasis markers
1029: null
Spaces inside code span elements
2676: null
Spaces inside code span elements
2676: null
Spaces inside code span elements
Path-based Instructions (1)
CHANGELOG.md (1)
Pattern
**/*.md
: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"
Additional comments not posted (4)
CHANGELOG.md (4)
122-122
: The description of the deprecation ofServerContext
and the introduction ofclient.GetCometConfigFromCmd(cmd)
is clear and informative.
122-122
: The update on the signature change ofHasAminoCodec
is clearly stated.
122-122
: The modification in the arguments forSimulateFromSeed
is accurately documented.
122-122
: The change in the argument type forNewMsgVerifyInvariant
is correctly documented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (1)
- x/genutil/client/cli/export_test.go (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/genutil/client/cli/export_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files ignored due to path filters (2)
core/go.mod
is excluded by!**/*.mod
core/go.sum
is excluded by!**/*.sum
Files selected for processing (2)
- server/util.go (3 hunks)
- simapp/test_helpers.go (2 hunks)
Files skipped from review as they are similar to previous changes (2)
- server/util.go
- simapp/test_helpers.go
Description
Ref: #20288 (comment)
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
in the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
Refactor
ServerContext
in favor of Viper-based configuration.Bug Fixes
Chores