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

Port findings platform over to new pattern #814

Closed
hellais opened this issue Mar 11, 2024 · 2 comments · Fixed by #850
Closed

Port findings platform over to new pattern #814

hellais opened this issue Mar 11, 2024 · 2 comments · Fixed by #850
Assignees
Labels
funder/otffoss2023-2024 ooni/api Issues related to https://github.com/ooni/api priority/medium

Comments

@hellais
Copy link
Member

hellais commented Mar 11, 2024

This is about taking https://github.com/ooni/backend/blob/master/api/ooniapi/incidents.py and porting it over to make use of fastapi.

Here are the specs for how it should be:

  • Service should be named oonifindings
  • Service should be 100% identical to old incidents
  • Service should follow the template of oonirun, but without postgresql and instead clickhouse
  • Service should make use of the incidents tests to ensure it's working as intended. We should add more tests to reach 100% code coverage.
  • Service should include metrics using prometheus
  • We should also add an integration test that performs actions on the incidents backend-fsn API and compares the results with the new one (they should behave identically).
  • Should setup clickhouse as a fixture in pytest by assuming the clickhouse server binary is installed on the system and available in PATH. It should start the server in a way that's it's throw away for the testing session, see how pytest-postgresql does this: https://github.com/ClearcodeHQ/pytest-postgresql

Once we have an initial iteration that's 100% compatible to the previous one we can work on a v2 version of the API that looks nicer, follows our more up to date API patterns and is backed by postgresql.

Keep an eye on this issue for docs on best-practices to come: #817

@hellais hellais added the ooni/api Issues related to https://github.com/ooni/api label Mar 11, 2024
@hellais hellais changed the title Port incidents reporting platform over to new pattern Port findings platform over to new pattern Mar 14, 2024
@DecFox DecFox reopened this Jun 21, 2024
@jbonisteel
Copy link

First deploy with current api compatibility.
We will make a separate issue where we make new end points based on the feedback from the PR review

@jbonisteel
Copy link

We will move this to prod once we have reduced AWS costs a bit

@DecFox DecFox closed this as completed Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
funder/otffoss2023-2024 ooni/api Issues related to https://github.com/ooni/api priority/medium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants