akash-network / akash-network/console

Refactor API for it to be runnable with an empty db

Open
#363 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
TypeScript
Stars
264
Forks
94
Avg merge
18h 49m
Merged PRs (30d)
297

Description

Currently we have an issue that console isn't runnable without historical data from the indexer db which api also depends on. It causes quite some issues:

  • this is obviously a tech debt which impacts decisions like CDCI workflows
  • we can't run integration/functional/e2e tests in CDCI as imported dbs are too large
  • it's only a matter of time when we or potential contributors aren't able to import a db as it grows constantly

What we need to do:
Refactor api to be runnable with empty data

  • base
  • Implement historical data seeders

Bonus points:

  • migrate db schemas from sequelize to drizzle
  • generage missing migrations

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the API and console depend on historical data from the indexer database, then identify the assumptions that prevent an empty database from working. Review the historical data seeder requirements and the database schemas managed by Sequelize. Done means the API can run with empty data and the required historical data can be seeded; CDCI integration, functional, and end-to-end tests should no longer require large imported databases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend-api-design, ci-cd, databases
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.