• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kobotoolbox / kpi / 27415076380
81%
master: 76%

Build:
Build:
LAST BUILD BRANCH: main
DEFAULT BRANCH: master
Ran 12 Jun 2026 12:20PM UTC
Jobs 10
Files 915
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 12:16PM UTC coverage: 82.004% (-0.003%) from 82.007%
27415076380

push

github

web-flow
feat(nlp): implement Google API US/EU region routing for Speech-to-Text and Translation DEV-2199 (#7128)

### 📣 Summary
This PR implements the server-wide Google ASR/MT location setting to
enforce strict EU data residency or utilize global US infrastructure for
Speech-to-Text (v2) and Translation (v3) APIs.

### 📖 Description
Following the parallel switch to Google Cloud Speech-to-Text v2 and
Translation v3, the previous ASR/MT region control setting (from
DEV-1943) was no longer functional. This PR re-establishes the
server-wide US/EU location toggle and ensures requests are routed to the
correct regional or global endpoints based on that configuration.

#### Speech-to-Text (ASR) Updates:
- The Google location is dynamically set to `us` or `eu` depending on
the server-wide `ASR_MT_GOOGLE_REGION` setting.

#### Translation (MT) Updates:
- EU traffic is explicitly routed through the dedicated
`translate-eu.googleapis.com` multi-regional gateway and processed in
`europe-west1`. This guarantees that TLS termination, processing, and
data-in-transit remain entirely within European borders.
- US traffic is routed through `translate-us.googleapis.com` +
`us-west1`.

#### Constance setting:
- Consolidated the legacy `ASR_MT_GOOGLE_TRANSLATION_LOCATION` setting
(which tracked granular locations like `us-central1` or `europe-west1`)
into a new `ASR_MT_GOOGLE_REGION` Constance setting that provides a
straightforward US or EU toggle.

#### Region code fallback fix (pre-existing bug):

- `TranscriptionService.get_language_code()` and `get_configuration()`
previously raised `LanguageNotSupported` for any region code not
explicitly listed in the database (e.g. `fr-BE`, `de-AT`). The check
`language_set.filter(code='fr-BE')` always returned false because
`fr-BE` is a region code, not a language code.
- Fixed: both methods now extract the parent language code (`fr` from
`fr-BE`) as a fallback. If the parent language is supported, the
original region code is passed thr... (continued)

9245 of 12483 branches covered (74.06%)

23 of 56 new or added lines in 5 files covered. (41.07%)

427 existing lines in 24 files now uncovered.

30548 of 37252 relevant lines covered (82.0%)

5.72 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
41.3
0.61% kobo/apps/subsequences/integrations/google/base.py
8
48.33
-4.39% kobo/apps/languages/models/transcription.py
8
63.64
kobo/apps/subsequences/integrations/google/locations.py
5
21.55
0.52% kobo/apps/subsequences/integrations/google/google_transcribe.py
3
22.58
0.88% kobo/apps/subsequences/integrations/google/google_translate.py

Coverage Regressions

Lines Coverage ∆ File
81
0.0
-93.1% kobo/apps/stripe/serializers.py
75
0.0
-41.9% kobo/apps/stripe/views.py
63
0.0
-51.64% kobo/apps/stripe/models.py
60
26.05
-50.42% kobo/apps/stripe/utils/subscription_limits.py
36
20.21
-38.3% kobo/apps/stripe/utils/billing_dates.py
19
0.0
-65.52% kobo/apps/stripe/admin.py
14
31.82
-31.82% kobo/apps/stripe/utils/limit_enforcement.py
12
35.0
-60.0% kobo/apps/stripe/utils/import_management.py
11
0.0
-44.0% kobo/apps/stripe/signals.py
9
0.0
-29.03% kobo/apps/stripe/utils/manual_subscription.py
8
0.0
-100.0% kobo/apps/stripe/urls.py
7
0.0
-100.0% kobo/apps/stripe/apps.py
6
0.0
-100.0% kobo/apps/stripe/exceptions.py
6
0.0
-37.5% kobo/apps/stripe/utils/view_utils.py
3
31.43
-2.86% kobo/apps/organizations/admin/organization.py
3
61.21
-1.82% kobo/apps/organizations/models.py
3
60.53
-7.89% kobo/apps/organizations/utils.py
2
44.14
-0.37% kobo/apps/openrosa/libs/utils/logger_tools.py
2
41.3
0.61% kobo/apps/subsequences/integrations/google/base.py
2
21.55
0.52% kobo/apps/subsequences/integrations/google/google_transcribe.py
2
22.58
0.88% kobo/apps/subsequences/integrations/google/google_translate.py
1
48.33
-4.39% kobo/apps/languages/models/transcription.py
1
92.31
-7.69% kobo/apps/user_reports/utils/migrations.py
1
75.0
-4.17% kpi/urls/__init__.py
Jobs
ID Job ID Ran Files Coverage
1 27415076380.1 12 Jun 2026 12:20PM UTC 911
51.92
2 27415076380.2 12 Jun 2026 12:21PM UTC 911
53.54
3 27415076380.3 12 Jun 2026 12:22PM UTC 913
53.15
4 27415076380.4 12 Jun 2026 12:23PM UTC 911
52.17
5 27415076380.5 12 Jun 2026 12:23PM UTC 913
54.79
6 27415076380.6 12 Jun 2026 12:24PM UTC 911
59.4
7 27415076380.7 12 Jun 2026 12:24PM UTC 913
66.08
8 27415076380.8 12 Jun 2026 12:24PM UTC 913
53.51
9 27415076380.9 12 Jun 2026 12:25PM UTC 913
60.53
10 27415076380.10 12 Jun 2026 12:26PM UTC 915
68.37
Source Files on build 27415076380
  • Tree
  • List 915
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • 59b63905 on github
  • Prev Build on release/2.026.21 (#27381181525)
  • Next Build on release/2.026.21 (#27622545666)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc