:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(docs): objectstorage is seaweedfs, not minio (#71983)
Raúl Negrón-Oteroeea9b365b8dc
diff --git a/AGENTS.md b/AGENTS.mdindex 6357be4a7c92..7e100ec0abb3 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -134,7 +134,7 @@ See [.agents/security.md](.agents/security.md) for security guidelines — least- **Django admin `ForeignKey` fields need explicit widget config.** When adding a `ForeignKey`/`OneToOneField` to a model that's exposed in Django admin (including via inlines attached to a _related_ admin), list the new field in `autocomplete_fields`, `raw_id_fields`, or `readonly_fields` on **every** admin class that renders the model — otherwise the default `<select>` widget loads the entire target table per row on each change-page render. Prefer declaring the config on a shared base inline so per-parent variants (e.g., subclasses differentiated by `fk_name`) inherit it automatically.- **Use personhog client for all person/group data access — do not query persons DB tables via the Django ORM or raw SQL.** The `posthog/personhog_client/` gRPC client is the required interface for reading and writing person-related data. This applies to the following tables: `posthog_person`, `posthog_persondistinctid`, `posthog_cohortpeople`, `posthog_group`, `posthog_grouptypemapping`, and related override tables (`posthog_personoverride`, `posthog_pendingpersonoverride`, `posthog_flatpersonoverride`, `posthog_featureflaghashkeyoverride`, `posthog_personlessdistinctid`, `posthog_personoverridemapping`). Use the helpers in `posthog/models/person/util.py` (e.g. `get_person_by_uuid`, `get_persons_by_distinct_ids`, `get_person_by_distinct_id`) and `posthog/models/group_type_mapping.py` (`get_group_types_for_project`) — these already route through personhog with ORM fallback via `_personhog_routed()`. When adding new person/group data access, follow the same `_personhog_routed()` pattern: provide a `personhog_fn` using `get_personhog_client()` and an `orm_fn` fallback. Never add new direct ORM queries like `Person.objects.filter(...)` or `PersonDistinctId.objects.filter(...)` — use the existing routed helpers or create new ones following the established pattern. See `posthog/personhog_client/README.md` for client details and `posthog/personhog_client/client.py` for the full RPC interface.- **PostHog does not enable `ATOMIC_REQUESTS` — there is no implicit per-request transaction.** Each database operation runs in autocommit mode unless explicitly wrapped. Use `with transaction.atomic():` around the specific writes that must succeed or fail together. Do not wrap an entire view method atomically — keep the block as narrow as possible around the related writes. Avoid performing irreversible side effects (sending emails, calling external APIs, enqueuing Celery tasks) inside an atomic block: if the transaction rolls back, those side effects have already happened. Schedule such side effects after the commit, or use `transaction.on_commit()` for Celery task dispatch.-- **Prefer SeaweedFS over MinIO for object storage — we are working to remove MinIO from the stack.** SeaweedFS (the `seaweedfs` service, S3 API on `:8333`) is the direction of travel for S3-compatible object storage and already backs session replay v2 (`SESSION_RECORDING_V2_S3_*` settings, default endpoint `http://seaweedfs:8333`). MinIO (the `objectstorage` service, S3 API on `:19000`) still backs general object storage (`OBJECT_STORAGE_*` settings — exports, media uploads, error-tracking source maps, query cache, tasks), but it is being phased out. Do not introduce new dependencies on MinIO: don't add new docker-compose services, scripts, tests, or docs that stand up a `minio/minio` container or hardcode `objectstorage:19000`. Both stores are S3-compatible, so code that talks to object storage should go through the existing `OBJECT_STORAGE_*` / `SESSION_RECORDING_V2_S3_*` config and a standard S3 client rather than hardcoding an endpoint — that keeps backends swappable as MinIO is retired. When a new local-dev feature needs an S3-compatible store, point it at SeaweedFS.+- **Object storage is SeaweedFS — do not add new MinIO dependencies.** Both S3-compatible stores in the dev/CI stack are SeaweedFS: the `objectstorage` service (S3 API on `:19000`) backs general object storage (`OBJECT_STORAGE_*` settings — exports, media uploads, error-tracking source maps, query cache, tasks), and the `seaweedfs` service (S3 API on `:8333`) backs session replay v2 (`SESSION_RECORDING_V2_S3_*` settings). MinIO now survives only as migration tooling: `docker-compose.hobby.yml` keeps it as a source for `bin/migrate-storage-hobby`, and `bin/upgrade-objectstorage` starts a throwaway MinIO to salvage objects off the pre-swap volume. Outside that, don't add docker-compose services, scripts, tests, or docs that stand up a `minio/minio` container. Code that talks to object storage should go through the existing `OBJECT_STORAGE_*` / `SESSION_RECORDING_V2_S3_*` config and a standard S3 client rather than hardcoding an endpoint — that keeps backends swappable. Note the `objectstorage` service registers its credentials at runtime via a bootstrap loop and returns `InvalidAccessKeyId` until that completes, so anything depending on it must wait for its readiness sentinel rather than just for the container to start.- **Temporal activity payloads have a ~2 MiB hard limit — pass large data by reference, not by value.** Activity inputs and outputs are serialized across a gRPC boundary that Temporal caps at ~2 MiB per payload (the server rejects larger payloads via `blobSizeLimitError`). As a conservative field-level rule, if a field could exceed ~256 KB once serialized (serialized query results, exported file contents, LLM context, rendered HTML, image bytes, unbounded `list[dict[str, Any]]`), write it to Postgres / S3 / object storage from _inside_ the activity and return only the reference (row ID, S3 key). The workflow already has access to any row ID created earlier in the same run; it does not need the content to flow back through. Shuttling large data through the workflow on the way to persistence is a foreseeable failure mode that produces `PayloadSizeError` (`TMPRL1103`) the moment the underlying data crosses the limit.- **Outbound calls to a third-party API that need rate-limiting or egress telemetry belong in `posthog/egress/` — add a `<domain>/` incarnation (GitHub is the reference) and route callers through its gated, recorded transport, never hand-rolled `requests`. See `posthog/egress/README.md`.**diff --git a/rust/common/s3/tests/README.md b/rust/common/s3/tests/README.mdindex 5ee8d365fef2..696b384dc616 100644--- a/rust/common/s3/tests/README.md+++ b/rust/common/s3/tests/README.md@@ -2,50 +2,35 @@## Running Integration Tests-The integration tests require MinIO to be running locally on port 19000.--### Option 1: Using PostHog Docker Compose (Recommended)+The integration tests run against the dev stack's `objectstorage` service — SeaweedFS, S3 API on port 19000.From the PostHog root directory:```bash-# Start just the MinIO service-docker-compose -f docker-compose.dev-full.yml up objectstorage -d+# Start object storage and wait until it is ready+docker compose -f docker-compose.dev-full.yml up objectstorage -d --wait# Run the integration testscd rust/common/s3cargo test -- --ignored-# Stop MinIO when done-docker-compose -f docker-compose.dev-full.yml down objectstorage+# Stop it when done+docker compose -f docker-compose.dev-full.yml stop objectstorage```-### Option 2: Using Docker directly--```bash-# Start MinIO with PostHog's credentials-docker run -p 19000:19000 -p 19001:19001 \- -e MINIO_ROOT_USER=object_storage_root_user \- -e MINIO_ROOT_PASSWORD=object_storage_root_password \- minio/minio:RELEASE.2025-04-22T22-12-26Z \- server --address ":19000" --console-address ":19001" /data--# Run the integration tests-cargo test -- --ignored-```--### Checking if MinIO is Running--You can verify MinIO is running by visiting: http://localhost:19001 (MinIO Console)+Wait for readiness rather than just for the container to start: SeaweedFS registers the+`object_storage_root_user` identity through a background bootstrap loop and returns+`InvalidAccessKeyId` until that completes. The service's healthcheck gates on that+bootstrap, so `--wait` is what makes these tests deterministic.-Login credentials:+Credentials are set by the compose service:-- Username: `object_storage_root_user`-- Password: `object_storage_root_password`+- Access key: `object_storage_root_user`+- Secret key: `object_storage_root_password`## Unit Tests-Unit tests don't require MinIO and test the mock implementation:+Unit tests don't need object storage and exercise the mock implementation:```bashcargo test --lib