hotosm / tasking-manager

Tasking Manager - The tool to team up for mapping in OpenStreetMap
https://wiki.openstreetmap.org/wiki/Tasking_Manager
BSD 2-Clause "Simplified" License
509 stars 275 forks source link

Fastapi refactor #6557

Open prabinoid opened 2 months ago

prabinoid commented 2 months ago

What type of PR is this? (check all applicable)

Related Issue

Related discussion: https://community.openstreetmap.org/t/migrating-tasking-manager-from-flask-to-fastapi-and-psycopg2-to-asyncpg/116543

Describe this PR

This PR includes the TM fastapi migration and covers the commits from the initial phases of the migration.

This PR is made only for the code review of the migration which is an ongoing process and hence the PR should NOT be merged currently.

Initially, the migration was done with sqlalchemy AsyncSession and orm but later we switched to raw sql query and encode databases to manage our async sessions and queries due to which parts of code needs cleaning and might be ambiguous too.

sonarcloud[bot] commented 1 day ago

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE