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

Setup infra for spark-observer #109

Closed
bajtos opened this issue May 27, 2024 · 1 comment
Closed

Setup infra for spark-observer #109

bajtos opened this issue May 27, 2024 · 1 comment
Assignees

Comments

@bajtos
Copy link
Contributor

bajtos commented May 27, 2024

As part of #97 and #106, we need to build a new service to listen for Meridian events and update spark-stats database. The current design, where spark-evaluate manages and updates the spark-stats database is no longer serving us well.

Going forward, we want to implement the following design:

  • A single repository to hold spark-stats database schema migration scripts, the code writing the stats (smart-contract event observer), the code reading the stats (REST API server)
  • A monorepo-like structure that makes it easy to install dependencies for all components, run tests for all components, etc. One command to perform the action for all components.
### Tasks
- [ ] https://github.com/filecoin-station/spark-impact-evaluator/issues/12
- [x] Migrate `spark-stats` database to `spark-evaluate` database. Update `spark-evaluate` and `spark-stats` database connection string in Fly secrets to use the new database.
- [x] Implement a new monorepo structure in the spark-api repository.
- [x] Rework the spark-stats repository to use this new monorepo structure too.
- [x] Add a new component `spark-observer` to the `spark-stats` repository, setup Fly.io deployment
- [x] Add database migration scripts to spark-stats repository.
- [x] Modify `spark-stats` to read from two databases: `spark-evaluate` for existing data, `spark-stats` for the future data created by spark-observer
### Nice-to-have improvements
- [ ] Add npm scripts like `test:api` and `lint:publish` to spark-api
- [ ] Add npm scripts like `test:stats` and `lint:observer` to spark-stats
@juliangruber
Copy link
Member

@bajtos I'm assigning you as DRI, so this issue has one. Feel free to change it if you disagree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants