Skip to content

feat(experimentation): add per-organisation ingestion infrastructure service#8035

Draft
gagantrivedi wants to merge 1 commit into
mainfrom
feat/experimentation-analytics-infra-service
Draft

feat(experimentation): add per-organisation ingestion infrastructure service#8035
gagantrivedi wants to merge 1 commit into
mainfrom
feat/experimentation-analytics-infra-service

Conversation

@gagantrivedi

Copy link
Copy Markdown
Member

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Adds a service layer for provisioning per-organisation experiment events ingestion infrastructure, to be consumed by the events ingestion server and hooked up to an API later.

  • New experimentation/ingestion_infra_service.py: provision_ingestion_infrastructure(organisation_id) idempotently creates an S3 events bucket and a DirectPut Firehose delivery stream per organisation.
  • The stream uses dynamic partitioning on each record's environment_key, so objects land under per-environment S3 namespaces (events/env_key=.../year=.../...) and are batched per environment.
  • New settings: INGESTION_EVENTS_BUCKET_PREFIX, INGESTION_FIREHOSE_DELIVERY_ROLE_ARN (a single shared Firehose delivery role, provisioned out-of-band, scoped by bucket naming convention).

Note: with a shared delivery role, per-stream/bucket isolation is enforced by the control plane (only this service sets stream destinations), not IAM; per-organisation roles are a possible v2 hardening.

How did you test this code?

Unit tests with moto covering fresh provisioning (full destination config), idempotent re-runs, missing-settings errors, and AWS client error propagation. make lint, make typecheck, and the full experimentation unit suite pass locally.

@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 17, 2026 9:53am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ignored Ignored Jul 17, 2026 9:53am
flagsmith-frontend-staging Ignored Ignored Jul 17, 2026 9:53am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e3461d87-52f3-4c3d-9213-545abb6aa5dd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added api Issue related to the REST API docs Documentation updates feature New feature or request and removed docs Documentation updates labels Jul 17, 2026
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.65%. Comparing base (4df9bfb) to head (a3882f9).

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #8035    +/-   ##
========================================
  Coverage   98.64%   98.65%            
========================================
  Files        1506     1508     +2     
  Lines       59572    59707   +135     
========================================
+ Hits        58766    58901   +135     
  Misses        806      806            

☔ View full report in Codecov by Harness.
📢 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.

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

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant