Skip to content

Feature/bitcaster integration#394

Open
roma-valor wants to merge 6 commits into
developfrom
feature/bitcaster-integration
Open

Feature/bitcaster integration#394
roma-valor wants to merge 6 commits into
developfrom
feature/bitcaster-integration

Conversation

@roma-valor
Copy link
Copy Markdown
Contributor

@roma-valor roma-valor commented May 26, 2026

Legal Boilerplate

AB#315502

Adds Bitcaster notification support. When data is imported, validated, or pushed to HOPE, the app now sends an async event to Bitcaster via a Celery task.

  • New country_workspace.notifications app — BitcasterClient (REST API wrapper), Django signals (data_imported, validation_completed, rdi_pushed, rdp_pushed), signal handlers that run Celery tasks.
  • Bitcaster configuration — five new BITCASTER_* settings wired through SmartEnv and settings.py.
  • Signal emission — data_imported_signal fired after successful batch imports from Aurora, Kobo, and RDI sources; rdi_pushed_signal / rdp_pushed_signal fired on HOPE push success or failure.
  • Chunked validation completion tracking — create_validation_jobs now assigns a shared validation_run_id and validation_total_chunks to every chunk job.

@roma-valor roma-valor force-pushed the feature/bitcaster-integration branch from 28615a1 to d40b5e1 Compare May 26, 2026 11:15
@roma-valor roma-valor marked this pull request as ready for review May 26, 2026 11:16
@roma-valor roma-valor marked this pull request as draft May 26, 2026 11:22
@roma-valor roma-valor marked this pull request as ready for review May 26, 2026 13:47
@codecov
Copy link
Copy Markdown

codecov Bot commented May 26, 2026

Codecov Report

❌ Patch coverage is 98.71795% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.95%. Comparing base (27f29ce) to head (68956f4).
⚠️ Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
src/country_workspace/notifications/notifier.py 88.88% 0 Missing and 1 partial ⚠️
src/country_workspace/notifications/tasks.py 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           develop     #394    +/-   ##
=========================================
  Coverage    96.94%   96.95%            
=========================================
  Files          237      244     +7     
  Lines         9756     9910   +154     
  Branches      1081     1090     +9     
=========================================
+ Hits          9458     9608   +150     
- Misses         142      143     +1     
- Partials       156      159     +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@roma-valor roma-valor requested a review from saxix May 26, 2026 17:11
@domdinicola
Copy link
Copy Markdown
Contributor

@roma-valor pls fix conflicts

@roma-valor roma-valor force-pushed the feature/bitcaster-integration branch from 3ec6031 to cd74e25 Compare May 29, 2026 08:06
"DEBUG_API_REQUESTS": (bool, False, False),
"BITCASTER_API_URL": (str, "", "http://localhost:8002", False, "Bitcaster API URL"),
"BITCASTER_API_KEY": (str, "", "", False, "Bitcaster API key"),
"BITCASTER_ORGANIZATION_SLUG": (str, "", "organization", False, "Bitcaster organization slug"),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BITCASTER_ORGANIZATION_SLUG = "unicef"
BITCASTER_PROJECT_SLUG = "hope"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@roma-valor roma-valor force-pushed the feature/bitcaster-integration branch from cd74e25 to 1d5b10a Compare June 1, 2026 08:17
@roma-valor roma-valor force-pushed the feature/bitcaster-integration branch from 1d5b10a to 68956f4 Compare June 1, 2026 10:30
@roma-valor roma-valor requested a review from saxix June 1, 2026 10:53
Copy link
Copy Markdown
Member

@saxix saxix left a comment

Choose a reason for hiding this comment

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

  • check bitcaster_sdk, it has a client and a retry mechanism, maybe we save some code
  • rdi_pushed_signal seems too "flexible", this flexibility can increase the filtering cost on BC side, (es. target and rdp_id seem optionals) maybe 2 signals?

@ntrncic
Copy link
Copy Markdown
Contributor

ntrncic commented Jun 5, 2026

@roma-valor description of PR please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants