BLAST DB Update Route Runtime Fix¶
Motivation¶
The dashboard calls /api/blast/databases/check-updates on load. Production returned HTTP 500 because the route used _requests without importing it.
User-facing change¶
The database update check endpoint now returns the latest NCBI BLAST database directory version instead of a runtime name '_requests' is not defined error. Related BLAST utility routes that also use _requests and ValidationError now import those dependencies explicitly.
API/IaC diff summary¶
- Added missing
requests as _requestsimport inapi/routes/blast_jobs.py. - Added missing
requests as _requestsandValidationErrorimports inapi/routes/blast_tools.py. - No IaC changes.
Validation evidence¶
python -m py_compile api/routes/blast_jobs.py api/routes/blast_tools.pypassed.pytest -q api/tests/test_models.py api/tests/test_passwords.py api/tests/test_sanitise.pypassed: 13 tests.scripts/dev/deploy-api.shdeployedfuncapp-202605132319.zipand reported/api/healthHTTP 200.- Browser smoke check on the production Static Web App returned HTTP 200 for
/api/blast/databases/check-updateswithlatest_version: 2026-05-09-01-05-02. - Dashboard cards render as
OK/Readyafter reload.