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

[Epic]: testing dependency graph #20279

Open
1 of 4 tasks
tac0turtle opened this issue May 4, 2024 · 0 comments
Open
1 of 4 tasks

[Epic]: testing dependency graph #20279

tac0turtle opened this issue May 4, 2024 · 0 comments
Assignees
Labels

Comments

@tac0turtle
Copy link
Member

tac0turtle commented May 4, 2024

Summary

Currently in testutils and thoughout the github.com/cosmos/cosmos-sdk go.mod we import modules in order to test integrations. This leads to a dependency graph in which modules depend on the sdk and the sdk depends on some modules. This is not ideal and leads circular dependencies for testing and releases.

In the past I started a counter module to replace some of the modules in the core sdk. We should create simple staking and bank modules which would only be used for testing, stripped down versions. The testing system would allow people to replace the mock bank and staking modules with their production counterparts when the tests require it.

This helps in avoiding the sdk depending on modules and in turn all modules having an indirect dependency on staking, bank and auth.

Problem Definition

Module & Cosmos SDK dependency graph leads to circular dependencies which lead to complex release plans.

Note: this is not an issue with previous releases. In the upcoming release we have spun out all modules into their own go.mods and in turn created this dependency graph issue.

Work Breakdown

  • write a simple staking module, the minimum needed for testing.
  • evaluate if a bank module is needed, if implement the minimum needed for testing.
    These modules should be part of the github.com/cosmos/cosmos-sdk go.mod. It should also live in testutil to avoid confusion with production modules.
  • Testutil should create an app with the mock modules but allow them to be replaced if the test requires the production module instead of the mock module.
  • Move counter module to testutils/x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants