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

refactor: remove viper as a direct dependency #21635

Merged
merged 13 commits into from
Sep 12, 2024
Merged

Conversation

kocubinski
Copy link
Member

@kocubinski kocubinski commented Sep 10, 2024

Description

This fell out as part of the v2 integration test work. It is desirable to interact with config through an abstraction rather than viper specifically.

Specifically, this PR introduces core/server.DynamicConfig to interface with runtime config instead of viper, analogous to server v1 AppOptions. This completely removes viper from runtime/v2/go.mod, and moves viper to an indirect (from direct) dependency in x/genutil and x/upgrade.


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...

  • included the correct type prefix in the PR title, you can find examples of the prefixes below:
  • confirmed ! in the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • confirmed all CI checks have passed

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.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • New Features

    • Introduced a dynamic configuration management system for enhanced flexibility in runtime settings.
    • Added functionality for setting store options in the application builder.
  • Bug Fixes

    • Improved error handling and type safety in command functions.
  • Refactor

    • Reorganized import paths and package structures for better clarity and maintainability.
    • Streamlined configuration handling by removing dependencies on the Viper library.
  • Chores

    • Updated dependency management to reference local modules for development and testing.
    • Added a new logging library for improved performance and structured logging capabilities.

Copy link
Contributor

coderabbitai bot commented Sep 10, 2024

Walkthrough

Walkthrough

The pull request introduces a new DynamicConfig interface in the core/server/config.go file to enhance dynamic configuration management. This change replaces the existing configuration management using the viper library across various components, including runtime/v2/builder.go, x/auth/tx/config/depinject.go, and others. Additionally, several dependencies are updated or removed in the go.mod files, reflecting a shift towards local development and improved modularity in the codebase.

Changes

File(s) Change Summary
core/server/config.go Introduced DynamicConfig interface with Get and GetString methods.
go.mod, runtime/v2/go.mod, simapp/go.mod, simapp/v2/go.mod, x/upgrade/go.mod Added local replacement for cosmossdk.io/core and removed various dependencies, including viper.
runtime/v2/builder.go, runtime/v2/module.go, x/auth/tx/config/depinject.go, x/upgrade/depinject.go Replaced viper usage with DynamicConfig, modifying related logic for configuration handling.
simapp/v2/app_di.go Added storeOptions variable for dynamic store configuration and updated appBuilder.Build().
simapp/v2/simdv2/cmd/commands.go, simapp/v2/simdv2/cmd/root_di.go Modified function signatures for improved clarity and context management.
tests/e2e/genutil/export_test.go, tests/integration/genutil/export_test.go, tests/integration/genutil/genaccount_test.go, tests/integration/genutil/init_test.go Changed package names and updated import paths for test utilities.
testutil/x/genutil/helper.go Changed package declaration to genutil.
x/genutil/v2/cli/export.go, x/genutil/v2/types.go Modified function signatures to remove logger and viper, adding ctx parameter instead.

Possibly related PRs

Suggested labels

C:core/testing, C:server/v2


Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5731e34 and 2580aff.

Files selected for processing (2)
  • runtime/v2/builder.go (5 hunks)
  • x/upgrade/depinject.go (4 hunks)
Additional context used
Path-based instructions (2)
x/upgrade/depinject.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

runtime/v2/builder.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

Additional comments not posted (7)
x/upgrade/depinject.go (2)

44-44: LGTM!

The change from Viper to DynamicConfig aligns with the goal of replacing Viper with a new dynamic configuration approach. Marking the field as optional allows for a smooth transition and backwards compatibility.


60-66: LGTM!

The updated logic in the ProvideModule function prioritizes using DynamicConfig over the previous AppOpts for configuration retrieval. This change reflects the shift towards the new dynamic configuration approach in server version 2.

runtime/v2/builder.go (5)

Line range hint 12-28: Approved: The changes align with the PR objective and simplify store options management.

The replacement of viper with server.DynamicConfig removes the direct dependency on Viper for configuration management, which is a key goal of this PR. Additionally, changing storeOptions from a pointer to a direct instance of rootstore.Options simplifies the management of store options within the AppBuilder.


123-129: Approved: The changes are consistent with the transition to server.DynamicConfig.

Retrieving the home directory path and the store.app-db-backend configuration value from a.config instead of a.viper aligns with the PR's objective of replacing Viper with server.DynamicConfig for configuration management.


134-142: Approved: The changes simplify the creation of factoryOptions.

Directly assigning an instance of rootstore.FactoryOptions to factoryOptions and setting its Options field to a.storeOptions simplifies the code and aligns with the changes made to the storeOptions field in the AppBuilder struct.

The previous comment suggesting a default value for a.storeOptions is no longer applicable due to the changes in the code.


213-218: The changes are purely cosmetic and do not require a comment.


219-223: Approved: The new AppBuilderWithStoreOptions function enhances configurability.

The introduction of the AppBuilderWithStoreOptions function allows setting store options through a functional option pattern, which enhances the configurability of the AppBuilder. It provides a convenient way to set store options when building the app.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added C:x/upgrade C:x/genutil genutil module issues labels Sep 11, 2024
@github-actions github-actions bot added C:server/v2 Issues related to server/v2 C:server/v2 cometbft labels Sep 11, 2024
@github-actions github-actions bot removed C:server/v2 Issues related to server/v2 C:server/v2 cometbft labels Sep 11, 2024
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (3)
core/server/config.go (1)

5-7: LGTM!

The DynamicConfig interface provides a clean abstraction for dynamic configuration management and adheres to the Uber Go Style Guide.

Consider using a more specific return type for the Get method instead of any to improve type safety. For example:

type DynamicConfig interface {
    Get(string) (any, bool)
    GetString(string) string 
}

This would allow the caller to check if the key exists and handle the case accordingly.

runtime/v2/go.mod (1)

Dependencies Still in Use: Reconsider Removal

The following dependencies are still being imported in the codebase, which suggests that their removal from go.mod could lead to issues:

  • github.com/mitchellh/mapstructure is imported in server/v2/config.go.
  • github.com/magiconair/properties is imported in crypto/keys/secp256k1/secp256k1_cgo_test.go.

Please verify the necessity of these dependencies and consider refactoring the code to remove their usage if they are no longer needed. Alternatively, ensure they remain in go.mod if they are still required.

Analysis chain

Line range hint 16-27: Removal of Viper dependency is approved, but verify the impact of removing other dependencies.

The removal of the github.com/spf13/viper dependency aligns with the PR objective and is approved.

However, several other dependencies have also been removed. Please verify that removing these dependencies does not introduce any unintended consequences or break any functionality.

Run the following script to verify the impact of removing the dependencies:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: 
# - Verify that the removed dependencies are not imported in the codebase.
# - Ensure that the tests pass after removing the dependencies.

# Test: Search for the removed dependencies in the codebase. Expect: No results.
rg --type go $'github.com/hashicorp/hcl|github.com/magiconair/properties|github.com/mitchellh/mapstructure|github.com/pelletier/go-toml/v2|github.com/sagikazarmark/locafero|github.com/sagikazarmark/slog-shim|github.com/sourcegraph/conc|github.com/spf13/pflag|github.com/subosito/gotenv|go.uber.org/multierr'

# Test: Run the tests. Expect: All tests pass.
go test ./...

Length of output: 2756


Script:

#!/bin/bash
# Description: Verify if the other removed dependencies are still being imported in the codebase.

# Test: Search for the remaining removed dependencies in the codebase. Expect: No results.
rg --type go $'github.com/hashicorp/hcl|github.com/magiconair/properties|github.com/mitchellh/mapstructure|github.com/sagikazarmark/locafero|github.com/sagikazarmark/slog-shim|github.com/sourcegraph/conc|github.com/subosito/gotenv|go.uber.org/multierr'

Length of output: 397

tests/integration/genutil/init_test.go (1)

Line range hint 44-97: Consider adding more test cases.

The test function covers the happy path scenario well. However, consider adding more test cases to cover error scenarios and improve the test coverage.

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 72620a5 and e0c9e3d.

Files ignored due to path filters (5)
  • go.sum is excluded by !**/*.sum
  • runtime/v2/go.sum is excluded by !**/*.sum
  • simapp/go.sum is excluded by !**/*.sum
  • simapp/v2/go.sum is excluded by !**/*.sum
  • x/upgrade/go.sum is excluded by !**/*.sum
Files selected for processing (24)
  • core/server/config.go (1 hunks)
  • go.mod (1 hunks)
  • runtime/v2/builder.go (6 hunks)
  • runtime/v2/go.mod (6 hunks)
  • runtime/v2/module.go (4 hunks)
  • simapp/go.mod (1 hunks)
  • simapp/simd/cmd/testnet_test.go (2 hunks)
  • simapp/v2/app_di.go (4 hunks)
  • simapp/v2/go.mod (1 hunks)
  • simapp/v2/simdv2/cmd/commands.go (4 hunks)
  • simapp/v2/simdv2/cmd/root_di.go (1 hunks)
  • tests/e2e/genutil/export_test.go (1 hunks)
  • tests/go.mod (2 hunks)
  • tests/integration/genutil/export_test.go (1 hunks)
  • tests/integration/genutil/genaccount_test.go (6 hunks)
  • tests/integration/genutil/init_test.go (8 hunks)
  • testutil/network/util.go (2 hunks)
  • testutil/x/genutil/helper.go (1 hunks)
  • x/auth/tx/config/depinject.go (4 hunks)
  • x/genutil/v2/cli/commands.go (1 hunks)
  • x/genutil/v2/cli/export.go (3 hunks)
  • x/genutil/v2/types.go (1 hunks)
  • x/upgrade/depinject.go (3 hunks)
  • x/upgrade/go.mod (3 hunks)
Files skipped from review due to trivial changes (8)
  • simapp/go.mod
  • simapp/simd/cmd/testnet_test.go
  • simapp/v2/go.mod
  • tests/e2e/genutil/export_test.go
  • tests/integration/genutil/export_test.go
  • tests/integration/genutil/genaccount_test.go
  • testutil/x/genutil/helper.go
  • x/genutil/v2/cli/commands.go
Additional context used
Path-based instructions (13)
core/server/config.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/genutil/v2/types.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/genutil/v2/cli/export.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/upgrade/depinject.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

simapp/v2/simdv2/cmd/root_di.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

simapp/v2/simdv2/cmd/commands.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

runtime/v2/module.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

runtime/v2/builder.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

testutil/network/util.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

simapp/v2/app_di.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

x/auth/tx/config/depinject.go (1)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.

tests/integration/genutil/init_test.go (3)

Pattern **/*.go: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.


Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"


Pattern **/*_test.go: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"

tests/go.mod (1)

Pattern tests/**/*: "Assess the integration and e2e test code assessing sufficient code coverage for the changes associated in the pull request"

Additional comments not posted (39)
x/genutil/v2/types.go (1)

4-4: Approve the change from logger to ctx, but request more information about the removal of viper.

  1. Replacing logger log.Logger with ctx context.Context:

    • This change is approved as it can enhance the function's ability to handle cancellation signals and deadlines, improving its integration with other components that utilize context.
  2. Removing viper *viper.Viper:

    • Please provide more information about the reason for removing the viper parameter and its impact on the codebase.
    • Is this change related to a broader refactoring or a shift in how configuration is managed within the application?

Also applies to: 11-11

x/genutil/v2/cli/export.go (3)

Line range hint 24-24: LGTM!

The changes to the ExportCmd function signature, which remove the logger and viper parameters, align with the PR objective of eliminating the direct dependency on the Viper library. This simplifies the command's execution flow by reducing dependencies on these variables.


63-63: LGTM!

The modification to the appExporter function call, which now passes the command's context directly instead of the logger and viper, aligns with the PR objective of introducing a new DynamicConfig interface to enhance dynamic configuration management and replace the existing configuration management using the viper library. This change streamlines the approach to exporting application state by relying solely on the command context and the other parameters.


100-103: LGTM!

The formatting changes to the flag definitions enhance the code's readability and maintainability without affecting functionality. The changes adhere to the Uber Golang style guide.

x/upgrade/depinject.go (4)

10-10: LGTM!

The import statement is correct and aligns with the PR objective of using the new DynamicConfig interface from the serverv2 package.


46-47: LGTM!

The changes to the ModuleInputs struct are correct and align with the PR objective of transitioning from the old AppOpts to the new DynamicConfig for configuration management. Marking both fields as optional ensures backward compatibility during the transition.


63-69: LGTM!

The changes to the ProvideModule function are correct and align with the PR objective of transitioning from AppOpts to DynamicConfig for configuration management. The code correctly prioritizes DynamicConfig over AppOpts and retrieves the necessary configuration values.


Line range hint 1-100: Code style and conformity with the Uber Golang style guide: LGTM!

The code follows the Uber Golang style guide, is well-formatted, and readable. No changes are required.

runtime/v2/go.mod (1)

8-8: LGTM!

The change to replace the cosmossdk.io/core module with a local path is approved. This change aligns with the PR objective of using a local development version of the module.

simapp/v2/simdv2/cmd/root_di.go (1)

85-85: Verify the removal of the generic type parameter T from the initRootCmd function.

The generic type parameter T has been removed from the initRootCmd function signature and the function call at line 85. This change suggests that the initRootCmd function is now constrained to work with a specific transaction type or a default transaction type, potentially limiting its flexibility in handling different transaction types.

Please verify if this change aligns with the intended design and functionality of the initRootCmd function. Consider the following:

  1. Is the initRootCmd function expected to handle only a specific transaction type or a default transaction type?
  2. Will the removal of the generic type parameter T impact the flexibility and extensibility of the initRootCmd function in the future?
  3. Are there any downstream dependencies or code that rely on the generic nature of the initRootCmd function?

If the change is intentional and aligns with the desired behavior, please ensure that the documentation and comments are updated accordingly to reflect the new functionality of the initRootCmd function.

simapp/v2/simdv2/cmd/commands.go (4)

89-98: Improved modularity in genesisCommand function.

The removal of the appExport parameter and retrieval of the function from the moduleManager within the genesisCommand function body is a positive change. It promotes a more encapsulated design where the command construction relies on the module manager's state rather than external parameters.

This change improves modularity, reduces coupling, and enhances the overall design of the command structure.


151-167: Enhanced context management and error handling in appExport function.

The update to the appExport function signature to include a ctx context.Context parameter and the extraction of viper and logger from the context is a positive change. It signifies a transition to a context-aware approach, allowing the function to access necessary values from the context.

Furthermore, the type checking of the extracted values enhances error handling and type safety within the function. It ensures that the function is more robust against incorrect usage and provides informative error messages when the expected types are not met.

Overall, these changes improve context management, error handling, and the overall reliability of the appExport function.


4-4: Appropriate import of "context" package.

The import of the "context" package aligns with the usage of context.Context in the updated appExport function. It is a necessary addition to support the context-aware approach introduced in the function.


12-12: Appropriate import of corectx package.

The import of the corectx package with an alias suggests its usage in the updated appExport function. It likely provides additional context-related functionality or constants used in the function, supporting the context-aware approach.

runtime/v2/module.go (3)

20-20: LGTM!

The new import statement is necessary to use the server.DynamicConfig type.


148-148: Looks good!

The changes to the AppInputs struct align with the PR objective to remove the direct dependency on Viper and introduce a new abstraction for dynamic configuration management.


159-160: LGTM!

The changes to the SetupAppBuilder function correctly handle the transition from using Viper to the new DynamicConfig for configuration management. The conditional assignment ensures backward compatibility when DynamicConfig is not provided.

runtime/v2/builder.go (5)

12-12: LGTM!

The import is necessary to use the server.DynamicConfig type in the AppBuilder struct.


27-28: LGTM!

The changes to the AppBuilder struct are part of the refactoring to remove the direct dependency on the Viper library and simplify the management of store options.


123-129: LGTM!

The changes to retrieve the home directory path and create a new database using server.DynamicConfig are consistent with the refactoring to remove the direct dependency on the Viper library.


134-142: LGTM!

The change to create rootstore.FactoryOptions using a.storeOptions simplifies the configuration handling within the AppBuilder.


Line range hint 205-233: LGTM!

The formatting change improves the readability of the AppBuilderWithTxValidator function, and the new AppBuilderWithStoreOptions function enhances the configurability of the AppBuilder by allowing store options to be set through a functional option pattern.

testutil/network/util.go (1)

183-187: LGTM!

The changes to the configuration setup process in the collectGenFiles function look good. Explicitly defining the configuration parameters improves clarity and control over the configuration process.

The code segment conforms to the Uber Go Style Guide.

simapp/v2/app_di.go (1)

Line range hint 101-200: LGTM!

The changes to the NewSimApp function look good:

  1. The introduction of the storeOptions variable and the associated logic to populate it from the Viper configuration enhances the flexibility of the application setup by allowing dynamic configuration of store options.

  2. The code adheres to the Uber Go Style Guide and follows idiomatic Go practices.

  3. Error handling is properly implemented when unmarshaling the sub-configuration.

  4. The modifications to the appBuilder.Build() call correctly integrate the storeOptions into the application builder process.

Overall, these changes improve the configurability of the NewSimApp function and provide a more flexible application setup.

go.mod (1)

188-188: LGTM! The change enhances local development.

The new replace directive that maps the module path cosmossdk.io/core to the local directory ./core is a good addition. It allows the Go module system to reference the local implementation of the core package instead of fetching it from the remote repository.

This change indicates a shift towards local development or testing of the core package without relying on external sources, which can be beneficial for faster iteration and debugging.

x/auth/tx/config/depinject.go (3)

18-18: LGTM!

The import statement is correct and necessary for using the DynamicConfig type in the ModuleInputs struct.


69-69: LGTM!

The addition of the optional DynamicConfig field is a key change that enables the transition from using Viper to the new dynamic configuration approach. Making it optional allows for backward compatibility.


129-130: LGTM!

The changes reflect the transition from using Viper to the new DynamicConfig for retrieving configuration values. The conditional check ensures that the new approach is used only when all the required dependencies (AccountKeeper, BankKeeper, and DynamicConfig) are available, maintaining backward compatibility.

x/upgrade/go.mod (2)

162-162: LGTM!

The change to make github.com/spf13/viper an indirect dependency aligns with the PR objective of removing the direct dependency on the viper library.


206-208: LGTM!

The addition of replace directives for cosmossdk.io/core, cosmossdk.io/core/testing, and cosmossdk.io/store modules to use local paths aligns with the PR objective of improving modularity in the codebase. Using local paths for these modules can facilitate testing and development.

tests/integration/genutil/init_test.go (8)

Line range hint 99-132: LGTM!

The code changes are approved.


Line range hint 134-161: LGTM!

The code changes are approved.


Line range hint 163-208: LGTM!

The code changes are approved.


Line range hint 210-242: LGTM!

The code changes are approved.


Line range hint 244-254: LGTM!

The code changes are approved.


Line range hint 256-304: LGTM!

The code changes are approved.


Line range hint 306-340: LGTM!

The code changes are approved.


Line range hint 342-374: LGTM!

The code changes are approved.

tests/go.mod (1)

53-53: Approved: Direct dependency on github.com/rs/zerolog is acceptable.

The change from an indirect to a direct dependency on the zerolog logging library aligns with the project's logging requirements and is acceptable.

@julienrbrt
Copy link
Member

We should use DynamicConfig in x/auth/tx/config as well

assuming you mean x/upgrade/depinject.go, which has both right now and looks pretty strange. will fix that.

No, I mean https://github.com/cosmos/cosmos-sdk/blob/f220f8b/x/auth/tx/config/depinject.go#L69

I'm not sure what branch you're linked to, but this PR has that line as DynamicConfig: https://github.com/cosmos/cosmos-sdk/blob/kocu/app-v2-config/x/auth/tx/config/depinject.go#L69

Ah, I missed that in the diff then 👍🏾

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

ACK.

We can possibly improve things in a follow-up, but let's merge this to unblock you.

Copy link
Contributor

@akhilkumarpilli akhilkumarpilli left a comment

Choose a reason for hiding this comment

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

ACK

@julienrbrt julienrbrt added this pull request to the merge queue Sep 12, 2024
Merged via the queue into main with commit 57f35dc Sep 12, 2024
73 of 74 checks passed
@julienrbrt julienrbrt deleted the kocu/app-v2-config branch September 12, 2024 06:06
@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Sep 12, 2024
mergify bot pushed a commit that referenced this pull request Sep 12, 2024
(cherry picked from commit 57f35dc)

# Conflicts:
#	go.mod
#	go.sum
#	runtime/v2/builder.go
#	runtime/v2/go.mod
#	runtime/v2/go.sum
#	runtime/v2/module.go
#	simapp/go.mod
#	simapp/go.sum
#	simapp/v2/go.mod
#	simapp/v2/go.sum
#	tests/go.mod
#	tests/go.sum
#	x/upgrade/go.mod
#	x/upgrade/go.sum
alessio pushed a commit to alessio/cosmos-sdk that referenced this pull request Sep 12, 2024
alpe added a commit that referenced this pull request Sep 12, 2024
* main:
  docs(client/debug): correct `debug raw-bytes` command example (#21671)
  build: don't reinstall golangci-lint if already installed (#21662)
  refactor(server/v2): kill viper from server components (#21663)
  chore: sync changelog with latest releases (#21658)
  refactor: remove viper as a direct dependency (#21635)
  ci: centralized job for rocksdb libaries cache (#21657)
  fix: remove stray fmt.Println (#21661)
julienrbrt added a commit that referenced this pull request Sep 12, 2024
Co-authored-by: Matt Kocubinski <mkocubinski@gmail.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release C:x/auth C:x/genutil genutil module issues C:x/upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants