Skip to content

Commit 225417b

Browse files
authored
Merge branch 'master' into scttcper/scm-source-context-new-stacktrace
2 parents 230b962 + 266c9b6 commit 225417b

File tree

558 files changed

+17164
-8832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

558 files changed

+17164
-8832
lines changed

.agents/skills/hybrid-cloud-outboxes/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ description: >-
1818

1919
Sentry uses a **transactional outbox pattern** for eventually consistent operations. When a model changes, an outbox row is written inside the same database transaction. After the transaction commits, the outbox is drained — firing a signal that triggers side effects such as RPC calls, tombstone propagation, or audit logging.
2020

21-
The most common use case is **cross-silo data replication**: a model saved in the Region silo produces a `RegionOutbox` that, when processed, replicates data to the Control silo (or vice versa via `ControlOutbox`). But the pattern is general — outboxes work for any operation that should happen reliably after a transaction commits, even within a single silo.
21+
The most common use case is **cross-silo data replication**: a model saved in the Cell silo produces a `CellOutbox` that, when processed, replicates data to the Control silo (or vice versa via `ControlOutbox`). But the pattern is general — outboxes work for any operation that should happen reliably after a transaction commits, even within a single silo.
2222

2323
There are two outbox types corresponding to the two directions of flow:
2424

25-
- **`RegionOutbox`** — written in a Cell silo, processed in the Cell silo to push data toward Control (via RPC calls in signal receivers).
25+
- **`CellOutbox`** — written in a Cell silo, processed in the Cell silo to push data toward Control (via RPC calls in signal receivers).
2626
- **`ControlOutbox`** — written in the Control silo, processed in the Control silo to push data toward one or more Cell silos. Each `ControlOutbox` row targets a specific `cell_name`.
2727

2828
## Critical Constraints
@@ -66,7 +66,7 @@ There are two outbox types corresponding to the two directions of flow:
6666

6767
| Data lives in... | Replicates toward... | Mixin | Outbox type |
6868
| ---------------- | -------------------- | ------------------------ | --------------- |
69-
| Cell silo | Control silo | `ReplicatedCellModel` | `RegionOutbox` |
69+
| Cell silo | Control silo | `ReplicatedCellModel` | `CellOutbox` |
7070
| Control silo | Cell silo(s) | `ReplicatedControlModel` | `ControlOutbox` |
7171

7272
### 2.2 `ReplicatedCellModel` Template
@@ -148,7 +148,7 @@ class MyModel(ReplicatedCellModel):
148148

149149
### 2.3 `ReplicatedControlModel` Template
150150

151-
Use this when a Control model needs to replicate data to Region silo(s). The key difference: Control outboxes fan out to one or more cells, so the model must declare which cells to target.
151+
Use this when a Control model needs to replicate data to Cell silo(s). The key difference: Control outboxes fan out to one or more cells, so the model must declare which cells to target.
152152

153153
```python
154154
from sentry.db.models import control_silo_model
@@ -360,7 +360,7 @@ def test_idempotent_replication(self):
360360

361361
### 7.3 Silo Test Decorators
362362

363-
- Use **`@cell_silo_test`** for tests focused on `RegionOutbox` creation
363+
- Use **`@cell_silo_test`** for tests focused on `CellOutbox` creation
364364
- Use **`@control_silo_test`** for tests focused on `ControlOutbox` creation
365365
- Use **`@all_silo_test`** for end-to-end replication tests that exercise both silos
366366
- Only use **`TransactionTestCase`** for threading/concurrency tests (e.g., `threading.Barrier`), not for standard outbox drain tests

.agents/skills/hybrid-cloud-outboxes/references/backfill.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Each batch (via `process_outbox_backfill_batch`):
110110

111111
1. Calls `_chunk_processing_batch` to determine the ID range `(low, up)` for this batch
112112
2. For each instance in `model.objects.filter(id__gte=low, id__lte=up)`:
113-
- Region models: `inst.outbox_for_update().save()` inside `outbox_context(flush=False)`
113+
- Cell models: `inst.outbox_for_update().save()` inside `outbox_context(flush=False)`
114114
- Control models: saves all `inst.outboxes_for_update()` inside `outbox_context(flush=False)`
115115
3. If no more rows: sets cursor to `(0, replication_version + 1)` (marks complete)
116116
4. Otherwise: advances cursor to `(up + 1, version)`
@@ -141,7 +141,7 @@ options.get("outbox_replication.sentry_mymodel.replication_version")
141141
### Check Outbox Queue Depth
142142

143143
```sql
144-
-- Region outboxes for a specific category
144+
-- Cell outboxes for a specific category
145145
SELECT count(*) FROM sentry_regionoutbox
146146
WHERE category = <category_value>;
147147

.agents/skills/hybrid-cloud-outboxes/references/debugging.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ When debugging stuck outboxes, you'll often need to generate SQL for a developer
4545

4646
| Direction | Model class | Table name |
4747
| ------------------ | --------------- | ---------------------- |
48-
| Cell -> Control | `RegionOutbox` | `sentry_regionoutbox` |
48+
| Cell -> Control | `CellOutbox` | `sentry_regionoutbox` |
4949
| Control -> Cell(s) | `ControlOutbox` | `sentry_controloutbox` |
5050

5151
**How to determine direction**: Look at the model that changed.

.agents/skills/hybrid-cloud-rpc/references/service-template.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from .model import * # noqa
77
from .service import * # noqa
88
```
99

10-
## `model.py` (REGION silo example)
10+
## `model.py` (CELL silo example)
1111

1212
```python
1313
# Please do not use
@@ -125,7 +125,7 @@ def serialize_my_thing(obj: MyThing) -> RpcMyThing:
125125
)
126126
```
127127

128-
## `service.py` (REGION silo)
128+
## `service.py` (CELL silo)
129129

130130
```python
131131
# Please do not use
@@ -223,7 +223,7 @@ class MyMappingService(RpcService):
223223
my_mapping_service = MyMappingService.create_delegation()
224224
```
225225

226-
## `impl.py` (REGION silo example)
226+
## `impl.py` (CELL silo example)
227227

228228
```python
229229
from __future__ import annotations

.agents/skills/hybrid-cloud-test-gen/references/outbox-tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import pytest
1212

1313
from sentry.hybridcloud.models.outbox import (
1414
ControlOutbox,
15-
RegionOutbox,
15+
CellOutbox,
1616
outbox_context,
1717
)
1818
from sentry.hybridcloud.outbox.category import OutboxCategory, OutboxScope
@@ -181,7 +181,7 @@ class Test{Feature}OutboxProcessing(TestCase):
181181
- **`assume_test_silo_mode_of(Model)`** is preferred for checking a specific model's state cross-silo. Auto-detects the model's silo.
182182
- **`assume_test_silo_mode(SiloMode.X)`** for blocks accessing multiple models or non-model resources.
183183
- **Factory calls** (`self.create_organization()`, etc.) must NEVER be wrapped in `assume_test_silo_mode`. Factories handle silo mode internally.
184-
- **`@control_silo_test`** for tests focused on `ControlOutbox` records. **`@cell_silo_test`** for `RegionOutbox`.
184+
- **`@control_silo_test`** for tests focused on `ControlOutbox` records. **`@cell_silo_test`** for `CellOutbox`.
185185
- Only use **`TransactionTestCase`** for threading/concurrency tests (e.g., `threading.Barrier`), not for standard outbox drain tests.
186186
- Outbox drain fixtures can clear state between tests:
187187
```python

.agents/skills/sentry-backend-bugs/references/missing-records.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The most common sources of stale IDs:
1717
1. **Snuba/ClickHouse query results** -- Snuba stores issue IDs, project IDs, and group IDs that may be deleted from Postgres before Snuba data expires
1818
2. **Workflow engine references** -- Detectors, subscriptions, and alert rules reference objects deleted asynchronously
1919
3. **Integration state** -- SentryAppInstallation, ServiceHook, or ExternalActor deleted while alert rules still reference them
20-
4. **Cross-silo references** -- Region silo holds IDs that reference control silo objects (or vice versa) that may be deleted asynchronously
20+
4. **Cross-silo references** -- Cell silo holds IDs that reference control silo objects (or vice versa) that may be deleted asynchronously
2121
5. **Cached foreign keys** -- A ProjectKey cached in Redis still references a `project_id` for a deleted project
2222
6. **Monitor/cron references** -- Environment objects referenced by monitors that may be deleted
2323

@@ -120,7 +120,7 @@ except Subscription.DoesNotExist:
120120
| Environment deleted while monitors reference it | High | `Environment.objects.get(id=monitor.env_id)` |
121121
| Integration uninstalled while rules active | High | Alert rules referencing deleted SentryApp |
122122
| Cached FK target deleted | Medium | `get_from_cache(id=fk_id)` after parent deleted |
123-
| Cross-silo object deleted asynchronously | Medium | Region silo references control silo object |
123+
| Cross-silo object deleted asynchronously | Medium | Cell silo references control silo object |
124124

125125
## Fix Patterns
126126

.agents/skills/sentry-security/references/endpoint-patterns.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ projects = self.get_projects(
174174
| -------------- | ---------------------- | ------------------------------------ | ------------------------------------------- |
175175
| Org-scoped | `OrganizationEndpoint` | `organization` in kwargs | `OrganizationPermission` (org:read for GET) |
176176
| Project-scoped | `ProjectEndpoint` | `organization` + `project` in kwargs | `ProjectPermission` |
177-
| Region silo | `RegionSiloEndpoint` | Nothing — must implement own auth | None |
177+
| Cell silo | `CellSiloEndpoint` | Nothing — must implement own auth | None |
178178
| Control silo | `ControlSiloEndpoint` | Nothing — must implement own auth | None |
179179

180-
If an endpoint inherits `RegionSiloEndpoint` or `Endpoint` directly instead of `OrganizationEndpoint`/`ProjectEndpoint`, verify it has its own authorization logic.
180+
If an endpoint inherits `CellSiloEndpoint` or `Endpoint` directly instead of `OrganizationEndpoint`/`ProjectEndpoint`, verify it has its own authorization logic.

.github/CODEOWNERS

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ pnpm-lock.yaml @getsentry/owners-js-de
248248
/src/sentry/snuba/subscriptions.py @getsentry/alerts-notifications
249249
/src/sentry/snuba/tasks.py @getsentry/alerts-notifications
250250
/tests/snuba/incidents/ @getsentry/alerts-notifications
251+
/src/sentry/rules/ @getsentry/alerts-notifications
251252
/tests/sentry/rules/ @getsentry/alerts-notifications
252253
/tests/sentry/snuba/test_query_subscription_consumer.py @getsentry/alerts-notifications
253254
/tests/sentry/snuba/test_subscriptions.py @getsentry/alerts-notifications
@@ -345,6 +346,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
345346
/static/app/views/performance/ @getsentry/data-browsing
346347
/static/app/components/performance/ @getsentry/data-browsing
347348
/static/app/utils/performance/ @getsentry/data-browsing
349+
/static/app/components/events/groupingInfo @getsentry/data-browsing
348350
/static/app/components/events/interfaces/spans/ @getsentry/data-browsing
349351
/static/app/components/events/viewHierarchy/* @getsentry/data-browsing
350352
/static/app/components/searchQueryBuilder/ @getsentry/data-browsing
@@ -434,8 +436,10 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
434436
## Frontend
435437
/static/app/components/analyticsArea.spec.tsx @getsentry/app-frontend
436438
/static/app/components/analyticsArea.tsx @getsentry/app-frontend
439+
/static/app/components/loading/ @getsentry/app-frontend
437440
/static/app/components/events/interfaces/ @getsentry/app-frontend
438441
/static/app/components/forms/ @getsentry/app-frontend
442+
/static/app/components/markdownTextArea.tsx @getsentry/app-frontend
439443
/static/app/locale.tsx @getsentry/app-frontend
440444
## End of Frontend
441445

@@ -460,11 +464,11 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
460464
/src/sentry/identity/ @getsentry/enterprise
461465

462466
/src/sentry/integrations/ @getsentry/product-owners-settings-integrations @getsentry/ecosystem
463-
/src/sentry/integrations/api/endpoints/organization_code_mapping*.py @getsentry/issue-detection-backend
467+
/src/sentry/integrations/api/endpoints/organization_code_mapping*.py @getsentry/coding-workflows-sentry-backend
464468
/src/sentry/integrations/api/endpoints/organization_coding_agents.py @getsentry/machine-learning-ai
465469
/src/sentry/integrations/coding_agent/ @getsentry/machine-learning-ai
466470
/src/sentry/integrations/utils/codecov.py @getsentry/codecov
467-
/src/sentry/integrations/utils/stacktrace_link.py @getsentry/issue-detection-backend
471+
/src/sentry/integrations/utils/stacktrace_link.py @getsentry/coding-workflows-sentry-backend
468472

469473
/src/sentry/mail/ @getsentry/alerts-notifications
470474
/src/sentry/notifications/ @getsentry/alerts-notifications @getsentry/ecosystem
@@ -607,6 +611,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
607611
/static/app/gettingStartedDocs/ @getsentry/value-discovery
608612
/static/app/types/project.tsx @getsentry/value-discovery
609613
/static/app/views/onboarding/ @getsentry/value-discovery
614+
/tests/acceptance/test_scm_onboarding.py @getsentry/value-discovery
610615
/tests/js/fixtures/detectedPlatform.ts @getsentry/value-discovery
611616
/static/app/views/projectInstall/ @getsentry/value-discovery
612617
/src/sentry/onboarding_tasks/ @getsentry/value-discovery
@@ -622,6 +627,10 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
622627
/tests/sentry/seer/fetch_issues/ @getsentry/machine-learning-ai @getsentry/coding-workflows-sentry-backend
623628
/src/sentry/tasks/seer/ @getsentry/machine-learning-ai
624629
/tests/sentry/tasks/seer/ @getsentry/machine-learning-ai
630+
/src/sentry/viewer_context.py @getsentry/machine-learning-ai
631+
/tests/sentry/test_viewer_context.py @getsentry/machine-learning-ai
632+
/src/sentry/middleware/viewer_context.py @getsentry/machine-learning-ai
633+
/tests/sentry/middleware/test_viewer_context.py @getsentry/machine-learning-ai
625634
## End of ML & AI
626635

627636
## Issues
@@ -637,15 +646,14 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
637646
/src/sentry/api/helpers/group_index/ @getsentry/issue-workflow
638647
/src/sentry/api/helpers/source_map_helper.py @getsentry/issue-workflow
639648
/src/sentry/api/endpoints/ @getsentry/issue-workflow
640-
/src/sentry/rules/ @getsentry/issue-detection-backend
641649
/src/sentry/processing_errors/ @getsentry/issue-detection-backend
642650
/src/sentry/api/helpers/group_index/delete.py @getsentry/issue-detection-backend
643651
/src/sentry/deletions/defaults/group.py @getsentry/issue-detection-backend
644652
/src/sentry/deletions/tasks/groups.py @getsentry/issue-detection-backend
645653
/src/sentry/event_manager.py @getsentry/issue-detection-backend
646654
/src/sentry/eventstore/models.py @getsentry/issue-detection-backend
647655
/src/sentry/grouping/ @getsentry/issue-detection-backend
648-
/src/sentry/issues/auto_source_code_config/ @getsentry/issue-detection-backend
656+
/src/sentry/issues/auto_source_code_config/ @getsentry/coding-workflows-sentry-backend
649657
/src/sentry/issues/endpoints/related_issues.py @getsentry/issue-detection-backend
650658
/src/sentry/issues/ingest.py @getsentry/issue-detection-backend
651659
/src/sentry/issues/issue_occurrence.py @getsentry/issue-detection-backend
@@ -665,16 +673,16 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
665673
/src/sentry/tasks/auto_ongoing_issues.py @getsentry/issue-detection-backend
666674
/src/sentry/tasks/auto_remove_inbox.py @getsentry/issue-detection-backend
667675
/src/sentry/tasks/auto_resolve_issues.py @getsentry/issue-detection-backend
668-
/src/sentry/tasks/auto_source_code_config.py @getsentry/issue-detection-backend
676+
/src/sentry/tasks/auto_source_code_config.py @getsentry/coding-workflows-sentry-backend
669677
/src/sentry/tasks/check_new_issue_threshold_met.py @getsentry/issue-detection-backend
670678
/src/sentry/tasks/clear_expired_resolutions.py @getsentry/issue-detection-backend
671679
/src/sentry/tasks/clear_expired_rulesnoozes.py @getsentry/issue-detection-backend
672680
/src/sentry/tasks/clear_expired_snoozes.py @getsentry/issue-detection-backend
673-
/src/sentry/tasks/codeowners/ @getsentry/issue-detection-backend
674-
/src/sentry/tasks/commit_context.py @getsentry/issue-detection-backend
681+
/src/sentry/tasks/codeowners/ @getsentry/coding-workflows-sentry-backend
682+
/src/sentry/tasks/commit_context.py @getsentry/coding-workflows-sentry-backend
675683
/src/sentry/tasks/seer/delete_seer_grouping_records.py @getsentry/issue-detection-backend
676684
/src/sentry/tasks/embeddings_grouping/ @getsentry/issue-detection-backend
677-
/src/sentry/tasks/groupowner.py @getsentry/issue-detection-backend
685+
/src/sentry/tasks/groupowner.py @getsentry/coding-workflows-sentry-backend
678686
/src/sentry/tasks/merge.py @getsentry/issue-detection-backend
679687
/src/sentry/tasks/unmerge.py @getsentry/issue-detection-backend
680688
/src/sentry/tasks/weekly_escalating_forecast.py @getsentry/issue-detection-backend
@@ -697,7 +705,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
697705
/tests/sentry/deletions/test_group.py @getsentry/issue-detection-backend
698706
/tests/sentry/event_manager/ @getsentry/issue-detection-backend
699707
/tests/sentry/grouping/ @getsentry/issue-detection-backend
700-
/tests/sentry/issues/auto_source_code_config/ @getsentry/issue-detection-backend
708+
/tests/sentry/issues/auto_source_code_config/ @getsentry/coding-workflows-sentry-backend
701709
/tests/sentry/issues/endpoints/ @getsentry/issue-workflow
702710
/tests/sentry/issues/endpoints/test_related_issues.py @getsentry/issue-detection-backend
703711
/tests/sentry/issues/test_ingest.py @getsentry/issue-detection-backend
@@ -720,9 +728,9 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
720728
/tests/sentry/tasks/test_clear_expired_resolutions.py @getsentry/issue-detection-backend
721729
/tests/sentry/tasks/test_clear_expired_rulesnoozes.py @getsentry/issue-detection-backend
722730
/tests/sentry/tasks/test_clear_expired_snoozes.py @getsentry/issue-detection-backend
723-
/tests/sentry/tasks/test_code_owners.py @getsentry/issue-detection-backend
724-
/tests/sentry/tasks/test_commit_context.py @getsentry/issue-detection-backend
725-
/tests/sentry/tasks/test_groupowner.py @getsentry/issue-detection-backend
731+
/tests/sentry/tasks/test_code_owners.py @getsentry/coding-workflows-sentry-backend
732+
/tests/sentry/tasks/test_commit_context.py @getsentry/coding-workflows-sentry-backend
733+
/tests/sentry/tasks/test_groupowner.py @getsentry/coding-workflows-sentry-backend
726734
/tests/sentry/tasks/test_merge.py @getsentry/issue-detection-backend
727735
/tests/sentry/tasks/test_post_process.py @getsentry/issue-detection-backend
728736
/tests/sentry/tasks/test_weekly_escalating_forecast.py @getsentry/issue-detection-backend

0 commit comments

Comments
 (0)