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

chore: setup monorepo structure + indexer workspace #3

Merged
merged 1 commit into from
Sep 4, 2024
Merged

Conversation

bajtos
Copy link
Member

@bajtos bajtos commented Sep 4, 2024

Based on the layout of https://github.com/filecoin-station/spark-stats

Components:

  • indexer: background service owning the persisted data, similar to spark-evaluate and spark-observer
  • REST API server exposing that data - to be done later

Links:

Signed-off-by: Miroslav Bajtoš <oss@bajtos.net>
@bajtos bajtos requested a review from juliangruber September 4, 2024 07:52
@bajtos bajtos merged commit d230eb9 into main Sep 4, 2024
@bajtos bajtos deleted the monorepo branch September 4, 2024 07:58
@bajtos
Copy link
Member Author

bajtos commented Sep 4, 2024

@juliangruber hindsight please 🙏🏻

"migrate": "node bin/migrate.js",
"start": "node bin/piece-indexer.js",
"lint": "standard",
"test": "node --test"
Copy link
Member

Choose a reason for hiding this comment

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

Could we include lint in test? To me, when I run npm test, I expect it to tell me whether CI will pass. This is not the case here. Or do you have a reason for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense.

However, your proposed change would mean that we execute the linter twice when you run npm test in the monorepo root.

I am using the setup we already have in other places:

What you can do in the monorepo root

  • npm test to run all CI checks in all workspaces (directories)
  • npm test -w indexer to run only the tests only in the indexer directory
  • npm lint -w indexer to run only the linters only in the indexer directory

},
"dependencies": {
"debug": "^4.3.6",
"ioredis": "^5.4.1"
Copy link
Member

Choose a reason for hiding this comment

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

What is ioredis used for here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it's not used here. I want to try using Redis instead of PG, as you did in spark-rewards, and I accidentally added ioredis to dependencies in the wrong PR.

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

Successfully merging this pull request may close these issues.

2 participants