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

Admin CLI app for performing administrative tasks such as applying indexes #426

Open
satran004 opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@satran004
Copy link
Member

Overview

During the start of the sync process with public networks like mainnet, preprod, etc., the default applications of yaci-store remove optional indexes (indexes required for read operations) from the database. These indexes need to be applied again after the sync reaches the tip. Currently, this is a manual process where the user must get the index SQL file from GitHub and apply it to the yaci-store database.

Solution

We can introduce a new CLI application, "admin-cli," to be distributed as part of the regular release. This CLI process can read the existing yaci-store configuration file to obtain the database connection details. It will support different commands for various kinds of administrative work.

Initially, it will include an "apply-index" command that can check the existing yaci-store tables and apply indexes if required.

In future releases, we can add additional tasks like creating application configurations for custom scope indexers, etc.

Benefits

  • Using this CLI app, the user can avoid manually copying the SQL file to apply indexes.
  • We won't need to maintain optional indexes in multiple applications like yaci-store-all or yaci-store-aggregation-app. The CLI app can analyze existing tables in the database and apply indexes accordingly, allowing us to maintain only one copy of the SQL file to apply indexes.
@satran004 satran004 added the enhancement New feature or request label Jan 22, 2025
@satran004 satran004 self-assigned this Jan 22, 2025
satran004 added a commit that referenced this issue Jan 28, 2025
satran004 added a commit that referenced this issue Feb 3, 2025
…rify-index" commands (#427)

* #426 Setup Admin CLI app project structure

* feat: #426 Initial implementation of dbutils module and admin-cli app

* refactor: #426 Remove all optional read indexes from migration sqls and add those to dbutils

* Comment graalvm setting to fix build error

* Fix sonatype issues
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant