fix: call_imports - #98
Conversation
|
| Filename | Overview |
|---|---|
| app/models/schemas.py | Requires recording_url in schema validation, but existing saved schemas still need migration or selection-time blocking. |
| app/api/v1/routes/call_imports.py | Treats recording_url as required during mapping and moves the diarisation default route before the UUID route. |
| app/services/telephony/exotel_client.py | Adds Exotel REST API host parsing, validation, and fallback behavior. |
| app/workers/tasks/process_call_import_row.py | Uses credentialed Exotel downloads for CSV-supplied recording URLs after call-id lookup does not produce audio. |
| app/services/storage/gcs_service.py | Adds IAM signBlob support for GCS signed URL generation with ADC and Workload Identity. |
| frontend/src/pages/callImports/components/MappingPanel.tsx | Improves persisted mapping hydration and updates cached call-import details after saving mappings. |
Reviews (2): Last reviewed commit: "fix: updating test cases" | Re-trigger Greptile
| "Schema must contain exactly one parameter of type " | ||
| "'conversation_id'." | ||
| ) | ||
| if rec_url_count != 1: | ||
| raise ValueError( | ||
| "Schema must contain exactly one parameter of type " | ||
| "'recording_url'." |
There was a problem hiding this comment.
This validation only runs when a schema create or update payload is submitted. Existing schemas that were saved without a recording_url parameter can still be listed and selected for a new telephony-backed import. In that path, mapping only iterates the parameters that exist, so no recording_url value is created and imported rows can still be stored with recording_url=None. Add a migration/backfill or reject these schemas when selected so legacy schemas cannot produce rows without the CSV recording URL mapping.
What Changed?
Briefly describe what this PR changes.
Why?
Explain the problem this solves and why this approach was chosen.
How to Test?
List clear steps for reviewers to verify the change.
Release Label
Select one semantic version bump intent for this PR:
major- breaking change, next release bumps major versionminor- backward-compatible feature, next release bumps minor versionfix- backward-compatible bug fix, next release bumps patch versionIf you do not have permission to apply labels, mention the intended release label here and a maintainer will set it.
Checklist
CONTRIBUTING.mdguide.