frappe / press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
https://frappe.cloud
GNU Affero General Public License v3.0
279 stars 195 forks source link

feat(SQLPlayground): move sql schema fetching task to agent job #2238

Closed tanmoysrt closed 4 weeks ago

tanmoysrt commented 4 weeks ago

Previously, we used only API to fetch the table schemas. But, some sites have large number of apps installed. So, they have hundreds of table. As a result, the API keeps timing out.

So, moved the table schema fetching task to agent job. For end-users it might take little bit more time to load playground for first time (due to agent delay), but this will work for any sites regardless of size.


Agent PR - https://github.com/frappe/agent/pull/141

codecov[bot] commented 4 weeks ago

Codecov Report

Attention: Patch coverage is 4.25532% with 45 lines in your changes missing coverage. Please review.

Project coverage is 30.05%. Comparing base (2a434b4) to head (817acfb). Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...atabase_table_schema/site_database_table_schema.py 0.00% 36 Missing :warning:
press/press/doctype/site/site.py 16.66% 5 Missing :warning:
press/press/doctype/agent_job/agent_job.py 0.00% 3 Missing :warning:
press/agent.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2238 +/- ## ========================================== - Coverage 30.10% 30.05% -0.05% ========================================== Files 369 370 +1 Lines 27890 27924 +34 ========================================== - Hits 8396 8393 -3 - Misses 19494 19531 +37 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.