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

Enforce type safety between interfaces [Debug Flag] #8

Closed
1 of 2 tasks
MHHukiewitz opened this issue Oct 17, 2022 · 1 comment
Closed
1 of 2 tasks

Enforce type safety between interfaces [Debug Flag] #8

MHHukiewitz opened this issue Oct 17, 2022 · 1 comment
Assignees

Comments

@MHHukiewitz
Copy link
Member

MHHukiewitz commented Oct 17, 2022

Problem: Debugging the indexer framework is unexpectedly hard due to the multi-threaded microservices architecture. Often, the data being sent around may not conform to the types given in the framework's interface definitions. This comes with two issues:

  1. The transaction data being received by the fetcher does not always conform to the types as expected in the framework. Changes in transaction structure can result in faulty data entering the framework and oftentimes leading to cryptic errors deep inside the framework. See Hotfix: Request legacy txn format #6.
  2. The same is true for data being passed around the microservices. The problem was first encountered when defining JSON objects' fields such as luxon.DateTime in Pull Request [Draft] Refactor Time Series Stats: Use Luxon, Generators and allow any kind of Time Frame sizing #1.

To improve the debugging process for the indexer framework, I propose the following:

  • adding a flag to enable schema checks on every interface where data is being parsed from JSON.
  • throwing errors every time the data does not conform to the given schema.

I believe this will help debug current issues on the indexer generator and the above PR, as well as future issues.

Tasks:

@MHHukiewitz MHHukiewitz self-assigned this Oct 17, 2022
@MHHukiewitz
Copy link
Member Author

Closed in favor of the more specific #19

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

1 participant