Skip to content

Commit 07df567

Browse files
committed
Merge branch 'master' into txiao/feat/update-seer-explorer-autofix-last-triggered-on-completion
2 parents 7863cbb + df62fec commit 07df567

File tree

280 files changed

+10289
-2866
lines changed

Some content is hidden

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

280 files changed

+10289
-2866
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The service's `local_mode` determines where the database-backed implementation r
4141

4242
| Data lives in... | `local_mode` | Decorator on methods | Example |
4343
| ------------------------------------------------- | ------------------ | ------------------------------- | ---------------------------------- |
44-
| Region silo (projects, events, issues, org data) | `SiloMode.CELL` | `@cell_rpc_method(resolve=...)` | `OrganizationService` |
44+
| Cell silo (projects, events, issues, org data) | `SiloMode.CELL` | `@cell_rpc_method(resolve=...)` | `OrganizationService` |
4545
| Control silo (users, auth, billing, org mappings) | `SiloMode.CONTROL` | `@rpc_method` | `OrganizationMemberMappingService` |
4646

4747
**Decision rule**: If the Django models you need to query live in the cell database, use `SiloMode.CELL`. If they live in the control database, use `SiloMode.CONTROL`.
@@ -95,7 +95,7 @@ If your service doesn't fit any of these, add a new entry to the `service_packag
9595

9696
## Step 4: Add or Update Methods
9797

98-
### For REGION silo services
98+
### For CELL silo services
9999

100100
Load `references/resolvers.md` for resolver details.
101101

@@ -217,11 +217,11 @@ Every RPC service needs three categories of tests: **silo mode compatibility**,
217217

218218
### 7.1 Silo mode compatibility with `@all_silo_test`
219219

220-
Every service test class MUST use `@all_silo_test` so tests run in all three modes (MONOLITH, REGION, CONTROL). This ensures the delegation layer works for both local and remote dispatch paths.
220+
Every service test class MUST use `@all_silo_test` so tests run in all three modes (MONOLITH, CELL, CONTROL). This ensures the delegation layer works for both local and remote dispatch paths.
221221

222222
```python
223223
from sentry.testutils.cases import TestCase, TransactionTestCase
224-
from sentry.testutils.silo import all_silo_test, assume_test_silo_mode, create_test_regions
224+
from sentry.testutils.silo import all_silo_test, assume_test_silo_mode, create_test_cells
225225

226226
@all_silo_test
227227
class MyServiceTest(TestCase):
@@ -234,8 +234,8 @@ class MyServiceTest(TestCase):
234234
For tests that need named cells (e.g., testing cell resolution):
235235

236236
```python
237-
@all_silo_test(regions=create_test_regions("us", "eu"))
238-
class MyServiceRegionTest(TransactionTestCase):
237+
@all_silo_test(cells=create_test_cells("us", "eu"))
238+
class MyServiceCellTest(TransactionTestCase):
239239
...
240240
```
241241

@@ -403,7 +403,7 @@ from sentry.testutils.silo import (
403403
cell_silo_test,
404404
assume_test_silo_mode,
405405
assume_test_silo_mode_of,
406-
create_test_regions,
406+
create_test_cells,
407407
)
408408
from sentry.testutils.outbox import outbox_runner
409409
from sentry.testutils.hybrid_cloud import HybridCloudTestMixin
@@ -423,7 +423,7 @@ Before submitting your PR, verify:
423423
- [ ] All RPC method parameters are keyword-only (`*` separator)
424424
- [ ] All parameters have explicit type annotations
425425
- [ ] All types are serializable (primitives, RpcModel, list, Optional, dict, Enum, datetime)
426-
- [ ] Region service methods have `@cell_rpc_method` with appropriate resolver
426+
- [ ] Cell service methods have `@cell_rpc_method` with appropriate resolver
427427
- [ ] Control service methods have `@rpc_method`
428428
- [ ] `@cell_rpc_method` / `@rpc_method` comes BEFORE `@abstractmethod`
429429
- [ ] `create_delegation()` is called at module level at the bottom of service.py

.agents/skills/hybrid-cloud-test-gen/SKILL.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,17 +65,17 @@ RPC service tests must cover:
6565

6666
### Quick Reference — Decorator & Base Class
6767

68-
| Scenario | Decorator | Base Class |
69-
| ---------------------------------- | --------------------------------------------------- | -------------------------------- |
70-
| Standard RPC service | `@all_silo_test` | `TestCase` |
71-
| RPC with named regions | `@all_silo_test(regions=create_test_regions("us"))` | `TestCase` |
72-
| RPC with member mapping assertions | `@all_silo_test` | `TestCase, HybridCloudTestMixin` |
68+
| Scenario | Decorator | Base Class |
69+
| ---------------------------------- | ----------------------------------------------- | -------------------------------- |
70+
| Standard RPC service | `@all_silo_test` | `TestCase` |
71+
| RPC with named cells | `@all_silo_test(cells=create_test_cells("us"))` | `TestCase` |
72+
| RPC with member mapping assertions | `@all_silo_test` | `TestCase, HybridCloudTestMixin` |
7373

7474
## Step 4: Generate API Gateway Tests
7575

7676
Load `references/api-gateway-tests.md` for complete templates and patterns.
7777

78-
API gateway tests verify that requests to control-silo endpoints are correctly proxied to the appropriate region. They must cover:
78+
API gateway tests verify that requests to control-silo endpoints are correctly proxied to the appropriate cell. They must cover:
7979

8080
- **Proxy pass-through**: Requests forwarded with correct params, headers, body
8181
- **Query parameter forwarding**: Multi-value params preserved
@@ -84,9 +84,9 @@ API gateway tests verify that requests to control-silo endpoints are correctly p
8484

8585
### Quick Reference — Decorator & Base Class
8686

87-
| Scenario | Decorator | Base Class |
88-
| --------------------- | ------------------------------------------------------------------------------------ | -------------------- |
89-
| Standard gateway test | `@control_silo_test(regions=[ApiGatewayTestCase.REGION], include_monolith_run=True)` | `ApiGatewayTestCase` |
87+
| Scenario | Decorator | Base Class |
88+
| --------------------- | -------------------------------------------------------------------------------- | -------------------- |
89+
| Standard gateway test | `@control_silo_test(cells=[ApiGatewayTestCase.CELL], include_monolith_run=True)` | `ApiGatewayTestCase` |
9090

9191
## Step 5: Generate Outbox Pattern Tests
9292

@@ -120,12 +120,12 @@ Endpoint silo tests verify that API endpoints work correctly under their declare
120120

121121
### Quick Reference — Decorator Mapping
122122

123-
| Endpoint Decorator | Test Decorator |
124-
| ------------------------------------- | ------------------------------------------------------- |
125-
| `@cell_silo_endpoint ` | `@cell_silo_test` |
126-
| `@control_silo_endpoint` | `@control_silo_test` |
127-
| `@control_silo_endpoint` (with proxy) | `@control_silo_test(regions=create_test_regions("us"))` |
128-
| No decorator (monolith-only) | `@no_silo_test` |
123+
| Endpoint Decorator | Test Decorator |
124+
| ------------------------------------- | --------------------------------------------------- |
125+
| `@cell_silo_endpoint ` | `@cell_silo_test` |
126+
| `@control_silo_endpoint` | `@control_silo_test` |
127+
| `@control_silo_endpoint` (with proxy) | `@control_silo_test(cells=create_test_cells("us"))` |
128+
| No decorator (monolith-only) | `@no_silo_test` |
129129

130130
## Step 7: Validate
131131

@@ -153,7 +153,7 @@ from sentry.testutils.silo import (
153153
no_silo_test,
154154
assume_test_silo_mode,
155155
assume_test_silo_mode_of,
156-
create_test_regions,
156+
create_test_cells,
157157
)
158158

159159
# Base classes

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ from sentry.utils import json
2626
## Template: Standard API Gateway Test
2727

2828
```python
29-
@control_silo_test(regions=[ApiGatewayTestCase.REGION], include_monolith_run=True)
29+
@control_silo_test(cells=[ApiGatewayTestCase.CELL], include_monolith_run=True)
3030
class Test{Feature}ApiGateway(ApiGatewayTestCase):
3131

3232
@responses.activate
@@ -36,7 +36,7 @@ class Test{Feature}ApiGateway(ApiGatewayTestCase):
3636
headers = dict(example="this")
3737
responses.add_callback(
3838
responses.GET,
39-
f"{self.REGION.address}/organizations/{self.organization.slug}/{endpoint_path}/",
39+
f"{self.CELL.address}/organizations/{self.organization.slug}/{endpoint_path}/",
4040
verify_request_params(query_params, headers),
4141
)
4242

@@ -58,7 +58,7 @@ class Test{Feature}ApiGateway(ApiGatewayTestCase):
5858
headers = {"content-type": "application/json"}
5959
responses.add_callback(
6060
responses.POST,
61-
f"{self.REGION.address}/organizations/{self.organization.slug}/{endpoint_path}/",
61+
f"{self.CELL.address}/organizations/{self.organization.slug}/{endpoint_path}/",
6262
verify_request_body(request_body, headers),
6363
)
6464

@@ -80,7 +80,7 @@ class Test{Feature}ApiGateway(ApiGatewayTestCase):
8080
"""Verify upstream errors are forwarded to the client."""
8181
responses.add(
8282
responses.GET,
83-
f"{self.REGION.address}/organizations/{self.organization.slug}/{endpoint_path}/",
83+
f"{self.CELL.address}/organizations/{self.organization.slug}/{endpoint_path}/",
8484
status=400,
8585
json={"detail": "Bad request"},
8686
)
@@ -104,7 +104,7 @@ In CONTROL mode, proxied responses are streamed. Use `close_streaming_response()
104104
"""Verify proxied response content is correct."""
105105
responses.add_callback(
106106
responses.GET,
107-
f"{self.REGION.address}/organizations/{self.organization.slug}/{endpoint_path}/",
107+
f"{self.CELL.address}/organizations/{self.organization.slug}/{endpoint_path}/",
108108
verify_request_params({}, {}),
109109
)
110110

@@ -128,20 +128,20 @@ In CONTROL mode, proxied responses are streamed. Use `close_streaming_response()
128128
## Template: SiloLimit Availability Check
129129

130130
```python
131-
def test_control_only_endpoint_unavailable_in_region(self):
131+
def test_control_only_endpoint_unavailable_in_cell(self):
132132
"""Verify control-only endpoints raise AvailabilityError outside their silo."""
133133
with pytest.raises(SiloLimit.AvailabilityError):
134134
self.client.get("/api/0/{control-only-path}/")
135135
```
136136

137137
## Key Patterns
138138

139-
- **`ApiGatewayTestCase`** sets up a test region, mock HTTP callbacks, and the API gateway middleware. It extends `APITestCase`.
140-
- **`@control_silo_test(regions=[...], include_monolith_run=True)`** runs the test in both CONTROL and MONOLITH modes.
141-
- **Every test method MUST use `@responses.activate`** because gateway tests mock HTTP calls to the region address.
139+
- **`ApiGatewayTestCase`** sets up a test cell, mock HTTP callbacks, and the API gateway middleware. It extends `APITestCase`.
140+
- **`@control_silo_test(cells=[...], include_monolith_run=True)`** runs the test in both CONTROL and MONOLITH modes.
141+
- **Every test method MUST use `@responses.activate`** because gateway tests mock HTTP calls to the cell address.
142142
- **`verify_request_params(params, headers)`** is a callback that asserts query params and headers match.
143143
- **`verify_request_body(body, headers)`** asserts POST body matches.
144144
- **`close_streaming_response(resp)`** reads a streaming response to bytes — required for proxied responses in CONTROL mode.
145145
- **`override_settings(MIDDLEWARE=tuple(self.middleware))`** ensures the API gateway middleware is active.
146-
- **`self.REGION`** is a pre-configured `Region` object with address `http://us.internal.sentry.io`.
147-
- **`self.organization`** is pre-created in `setUp` and bound to `self.REGION`.
146+
- **`self.CELL`** is a pre-configured `Cell` object with address `http://us.internal.sentry.io`.
147+
- **`self.organization`** is pre-created in `setUp` and bound to `self.CELL`.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ from sentry.testutils.silo import (
1010
no_silo_test,
1111
assume_test_silo_mode,
1212
assume_test_silo_mode_of,
13-
create_test_regions,
13+
create_test_cells,
1414
)
1515
from sentry.silo.base import SiloMode
1616
```
@@ -19,14 +19,14 @@ from sentry.silo.base import SiloMode
1919

2020
Match the endpoint's silo decorator to the test's silo decorator:
2121

22-
| Endpoint Decorator | Test Decorator |
23-
| -------------------------------------------- | ------------------------------------------------------- |
24-
| `@cell_silo_endpoint` | `@cell_silo_test` |
25-
| `@control_silo_endpoint` | `@control_silo_test` |
26-
| `@control_silo_endpoint` (proxies to region) | `@control_silo_test(regions=create_test_regions("us"))` |
27-
| No silo decorator | `@no_silo_test` |
22+
| Endpoint Decorator | Test Decorator |
23+
| ------------------------------------------ | --------------------------------------------------- |
24+
| `@cell_silo_endpoint` | `@cell_silo_test` |
25+
| `@control_silo_endpoint` | `@control_silo_test` |
26+
| `@control_silo_endpoint` (proxies to cell) | `@control_silo_test(cells=create_test_cells("us"))` |
27+
| No silo decorator | `@no_silo_test` |
2828

29-
## Template: Region Silo Endpoint Test
29+
## Template: Cell Silo Endpoint Test
3030

3131
```python
3232
@cell_silo_test

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ from sentry.testutils.silo import (
2727
all_silo_test,
2828
assume_test_silo_mode,
2929
assume_test_silo_mode_of,
30-
create_test_regions,
30+
create_test_cells,
3131
)
3232
```
3333

@@ -92,7 +92,7 @@ class Test{ServiceName}Service(TestCase):
9292
Prefer `assume_test_silo_mode_of(Model)` over `assume_test_silo_mode(SiloMode.X)` when checking a single model:
9393

9494
```python
95-
@all_silo_test(regions=create_test_regions("us"))
95+
@all_silo_test(cells=create_test_cells("us"))
9696
class Test{ServiceName}CrossSilo(TestCase, HybridCloudTestMixin):
9797
def test_{method_name}_creates_mapping(self):
9898
with outbox_runner():

.github/CODEOWNERS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pnpm-lock.yaml @getsentry/owners-js-de
221221
/src/sentry/organizations/ @getsentry/hybrid-cloud
222222
/tests/sentry/hybridcloud/ @getsentry/hybrid-cloud
223223
/tests/sentry/silo/ @getsentry/hybrid-cloud
224+
/tests/sentry/models/test_projectkeymapping.py @getsentry/hybrid-cloud
224225
/.agents/skills/hybrid-cloud-* @getsentry/hybrid-cloud
225226
## End of Hybrid Cloud
226227

@@ -293,6 +294,7 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
293294

294295
/src/sentry/search/events/ @getsentry/data-browsing
295296
/src/sentry/search/eap/ @getsentry/data-browsing
297+
/src/sentry/search/exceptions.py @getsentry/data-browsing
296298

297299
/src/sentry/issue_detection/ @getsentry/issue-detection-backend
298300
/tests/sentry/issue_detection/ @getsentry/issue-detection-backend
@@ -570,7 +572,9 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
570572
/src/sentry/dynamic_sampling/ @getsentry/telemetry-experience
571573
/tests/sentry/dynamic_sampling/ @getsentry/telemetry-experience
572574
/src/sentry/release_health/metrics_sessions_v2.py @getsentry/telemetry-experience
575+
/src/sentry/release_health/eap_sessions_rollout.py @getsentry/telemetry-experience
573576
/tests/sentry/release_health/test_metrics_sessions_v2.py @getsentry/telemetry-experience
577+
/tests/sentry/release_health/test_eap_sessions_rollout.py @getsentry/telemetry-experience
574578
/src/sentry/utils/platform_categories.py @getsentry/telemetry-experience
575579
/src/sentry/sentry_metrics/querying/ @getsentry/telemetry-experience
576580
/tests/sentry/sentry_metrics/querying/ @getsentry/telemetry-experience
@@ -793,6 +797,8 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
793797
/src/sentry/preprod/ @getsentry/emerge-tools
794798
/static/app/views/preprod/ @getsentry/emerge-tools
795799
/tests/sentry/preprod/ @getsentry/emerge-tools
800+
/static/app/components/events/eventInsightDiff.tsx @getsentry/emerge-tools
801+
/bin/preprod/ @getsentry/emerge-tools
796802
# End of preprod
797803

798804
## Frontend Platform (keep last as we want highest specificity)
@@ -861,6 +867,10 @@ tests/sentry/api/endpoints/test_organization_attribute_mappings.py @get
861867
/tests/sentry/scm/ @getsentry/scm
862868
## End of SCM
863869

870+
## SCM Frontend
871+
/static/app/components/repositories @getsentry/coding-workflows-sentry-frontend @getsentry/scm
872+
## End of SCM Frontend
873+
864874
# End of Coding Workflows
865875

866876
# Conduit

.github/codeowners-coverage-baseline.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,6 @@ bin/load-integration-data
4646
bin/load-mocks
4747
bin/merge-catalogs
4848
bin/model-dependency-graphviz
49-
bin/preprod/test_pr_details
50-
bin/preprod/trigger_pr_comment
51-
bin/preprod/trigger_size_status_check
52-
bin/preprod/trigger_snapshot_status_check
5349
bin/run-model-tests
5450
bin/save-integration-data
5551
bin/send_metrics.py
@@ -756,8 +752,6 @@ static/app/components/hook.spec.tsx
756752
static/app/components/hook.tsx
757753
static/app/components/hookOrDefault.spec.tsx
758754
static/app/components/hookOrDefault.tsx
759-
static/app/components/hotkeysLabel.spec.tsx
760-
static/app/components/hotkeysLabel.tsx
761755
static/app/components/hovercard.spec.tsx
762756
static/app/components/hovercard.tsx
763757
static/app/components/iconCircledNumber.tsx
@@ -1507,6 +1501,8 @@ static/gsAdmin/components/addGiftBudgetAction.tsx
15071501
static/gsAdmin/components/addGiftEventsAction.spec.tsx
15081502
static/gsAdmin/components/addGiftEventsAction.tsx
15091503
static/gsAdmin/components/addOrRemoveOrgModal.tsx
1504+
static/gsAdmin/components/addToStartupProgramAction.spec.tsx
1505+
static/gsAdmin/components/addToStartupProgramAction.tsx
15101506
static/gsAdmin/components/adminConfirmationModal.spec.tsx
15111507
static/gsAdmin/components/adminConfirmationModal.tsx
15121508
static/gsAdmin/components/beacons/beaconCheckins.tsx

.github/workflows/frontend-snapshots.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969

7070
- name: Install sentry-cli
7171
if: ${{ !cancelled() }}
72-
run: curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=3.3.3 sh
72+
run: curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=3.3.4 sh
7373

7474
- name: Upload snapshots
7575
id: upload

bin/preprod/upload_snapshots

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
SENTRY_URL="http://127.0.0.1:8000"
5+
AUTH_TOKEN="${AUTH_TOKEN:?AUTH_TOKEN environment variable is required}"
6+
ORG_SLUG="sentry"
7+
PROJECT_SLUG="internal"
8+
APP_ID="test-app"
9+
10+
BEFORE_DIR="${BEFORE_DIR:-$HOME/Downloads/base_snapshots_export_small}"
11+
AFTER_DIR="${AFTER_DIR:-$HOME/Downloads/head_snapshots_export_small}"
12+
13+
TOP_ARGS=(
14+
--auth-token "$AUTH_TOKEN"
15+
--url "$SENTRY_URL"
16+
)
17+
18+
SUB_ARGS=(
19+
-o "$ORG_SLUG"
20+
-p "$PROJECT_SLUG"
21+
--app-id "$APP_ID"
22+
--no-git-metadata
23+
--vcs-provider github
24+
--head-repo-name "testing-repo"
25+
)
26+
27+
echo "=== Uploading: Baseline (main) ==="
28+
sentry-cli "${TOP_ARGS[@]}" build snapshots "$BEFORE_DIR" \
29+
"${SUB_ARGS[@]}" \
30+
--head-sha "1111111111111111111111111111111111111111" \
31+
--head-ref main
32+
33+
echo ""
34+
echo "=== Uploading: PR Branch (testing-branch) ==="
35+
sentry-cli "${TOP_ARGS[@]}" build snapshots "$AFTER_DIR" \
36+
"${SUB_ARGS[@]}" \
37+
--head-sha "2222222222222222222222222222222222222222" \
38+
--base-sha "1111111111111111111111111111111111111111" \
39+
--base-repo-name "testing-repo" \
40+
--head-ref "testing-branch" \
41+
--base-ref main \
42+
--pr-number 1

0 commit comments

Comments
 (0)