Skip to content

fix: call_imports - #98

Merged
TEJASNARAYANS merged 2 commits into
mainfrom
call-import-fixes
Jul 8, 2026
Merged

fix: call_imports#98
TEJASNARAYANS merged 2 commits into
mainfrom
call-import-fixes

Conversation

@TEJASNARAYANS

@TEJASNARAYANS TEJASNARAYANS commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

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 version
  • minor - backward-compatible feature, next release bumps minor version
  • fix - backward-compatible bug fix, next release bumps patch version
  • No label (defaults to patch release)

If you do not have permission to apply labels, mention the intended release label here and a maintainer will set it.

Checklist

  • I have read the CONTRIBUTING.md guide.
  • My code follows the project's style guidelines.
  • I have added tests that prove my fix is effective or my feature works.
  • I have updated documentation where needed.

@TEJASNARAYANS TEJASNARAYANS added the fix Fix version release label Jul 8, 2026
@greptile-apps

greptile-apps Bot commented Jul 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates the call-import flow and related integrations. The main changes are:

  • Requires and maps recording_url schema parameters.
  • Adds Exotel API host validation and fallback handling.
  • Uses credentialed Exotel downloads for CSV recording URLs.
  • Adds GCS Workload Identity signed URL support.
  • Updates the call-import UI, docs, and tests.

Confidence Score: 4/5

This is close, but the legacy schema case should be fixed before merging.

  • Existing schemas without recording_url can still be selected.
  • Those schemas can still create rows without a mapped recording URL.
  • The Exotel host and CSV download changes address the reviewed call-import paths.

app/models/schemas.py, app/api/v1/routes/call_imports.py

Important Files Changed

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

Comment thread app/models/schemas.py
Comment thread app/services/telephony/telephony_service.py
Comment thread app/workers/tasks/process_call_import_row.py
Comment thread app/models/schemas.py
Comment on lines 2281 to +2287
"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'."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Migrate legacy schemas

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.

@TEJASNARAYANS
TEJASNARAYANS merged commit 7346481 into main Jul 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant