Skip to content

Commit 40ab2f1

Browse files
authored
Merge branch 'master' into ognjenbostjancic/tet-2453-support-thinking-messages-in-product
2 parents f2b8bf9 + d98423c commit 40ab2f1

273 files changed

Lines changed: 7816 additions & 4704 deletions

File tree

Some content is hidden

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

.agents/skills/cell-architecture/SKILL.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ description: >-
88
URL_NAME_TO_ACTION registry in test_urls.py to zero (with a recipe for each action type),
99
rolling deploy safety and the two-phase pattern required by independent sentry/getsentry deploys,
1010
and the region -> cell rename including what not to rename (DB columns, AWS refs, uptime regions,
11-
billing address). Also documents known issues with proposed fixes: org listing and creation
12-
without a slug, integration TeamLinkageView routing, Jira cross-cell fan-out, and relocation
13-
endpoint routing.
11+
billing address). Also documents known issues with proposed fixes: integration TeamLinkageView
12+
routing, Jira cross-cell fan-out, and relocation endpoint routing.
1413
---
1514

1615
> **Status**: Active migration in progress. Migration-specific sections should be removed once complete, leaving a stable architecture reference.
@@ -245,17 +244,6 @@ the context before renaming.
245244

246245
Specific broken areas with a description of the problem and the proposed fix. Remove each entry once resolved.
247246

248-
#### Org Operations Without an Existing Org Slug
249-
250-
Several org lifecycle operations have no existing org slug to route by, so Synapse can't route them to a specific cell within a locality:
251-
252-
- **Org listing** — the frontend fans out `/organizations/` to each locality URL (`useOrganizationsWithRegion`). `OrganizationIndexEndpoint` is `@cell_silo_endpoint` and queries `Organization.objects.get_for_user_ids()`, so even if it reaches a cell it only returns orgs in that cell.
253-
- **Org creation** — the user picks a locality but there's no mechanism to select which cell within that locality the new org lands in.
254-
255-
**The fix for listing**: move `OrganizationIndexEndpoint` to `@control_silo_endpoint` and query `OrganizationMemberMapping` (user -> org IDs) joined with `OrganizationMapping` — both already exist on control silo. Some response fields (e.g. avatar, auth provider, features) are not yet in `OrganizationMapping` and would need to be replicated or dropped.
256-
257-
**Org creation**: `Locality.new_org_cell` to route new orgs to the correct cell within the selected locality.
258-
259247
#### Integration Views and Cell Routing
260248

261249
`TeamLinkageView` (link-team, unlink-team) is broken in two ways: it uses signed URLs with `integration_id` instead of org slug so Synapse can't route it, and it queries `OrganizationMember.get_for_integration()` (cell-silo) so it only sees orgs in the current locality anyway.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ build-utils/ @getsentry/owners-js-bu
176176
eslint.config.ts @getsentry/owners-js-build
177177
jest-balance.json @getsentry/owners-js-build
178178
jest.config.ts @getsentry/owners-js-build
179+
/tests/js/test-balancer/ @getsentry/owners-js-build
179180
tsconfig.* @getsentry/owners-js-build
180181
.node-version @getsentry/owners-js-deps
181182
package.json @getsentry/owners-js-deps

.github/codeowners-coverage-baseline.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,7 +1846,6 @@ tests/js/instrumentedEnv/userEventIntegration.ts
18461846
tests/js/jest-pegjs-transform.js
18471847
tests/js/setup.ts
18481848
tests/js/setupFramework.ts
1849-
tests/js/test-balancer/index.js
18501849
tests/sentry/__init__.py
18511850
tests/sentry/analytics/__init__.py
18521851
tests/sentry/analytics/test_base.py

.github/workflows/frontend-snapshots.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ jobs:
6565
run: pnpm exec playwright install chromium --with-deps
6666

6767
- name: Run snapshot tests
68+
env:
69+
SENTRY_DSN: ${{ secrets.SENTRY_SNAPSHOTS_DSN }}
70+
GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
71+
GITHUB_PR_REF: ${{ github.event.pull_request.head.ref || github.ref }}
6872
run: pnpm run snapshots
6973

7074
- name: Compute merge base SHA

.github/workflows/jest-balance.yml

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,98 @@ on:
44
schedule:
55
- cron: '0 0 1,15 * *'
66
jobs:
7+
jest-config:
8+
name: Configure Jest
9+
runs-on: ubuntu-24.04
10+
timeout-minutes: 5
11+
outputs:
12+
jest_test_matrix: ${{ steps.jest_test_config.outputs.jest_test_matrix }}
13+
steps:
14+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
15+
name: Checkout sentry
16+
17+
- uses: ./.github/actions/setup-node-pnpm
18+
19+
- name: Jest Test Config
20+
id: jest_test_config
21+
env:
22+
FRONTEND_ALL_FILES: ''
23+
run: ./.github/workflows/scripts/jest-test-config.sh
24+
25+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
26+
name: Upload jest test file list
27+
with:
28+
name: jest-test-files
29+
path: jest-test-files.json
30+
if-no-files-found: ignore
31+
retention-days: 1
32+
733
jest-balance:
8-
# Buckle up, this may take a while
34+
needs: jest-config
935
timeout-minutes: 60
1036
# Make sure this matches the runner that runs frontend tests
1137
runs-on: ubuntu-24.04
38+
strategy:
39+
fail-fast: false
40+
matrix: ${{ fromJson(needs.jest-config.outputs.jest_test_matrix) }}
1241
steps:
1342
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
43+
name: Checkout sentry
1444

1545
- uses: ./.github/actions/setup-node-pnpm
1646

17-
- name: jest balancer
47+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
48+
name: Download jest-test-files.json
49+
with:
50+
name: jest-test-files
51+
path: .
52+
53+
- name: Download jest-balance.json
54+
uses: dawidd6/action-download-artifact@ac66b43f0e6a346234dd65d4d0c8fbb31cb316e5 # v11
55+
with:
56+
workflow: 38531594 # jest-balancer.yml
57+
workflow_conclusion: success
58+
branch: master
59+
name: jest-balance.json
60+
name_is_regexp: false
61+
path: tests/js/test-balancer/
62+
search_artifacts: true
63+
if_no_artifact_found: warn
64+
65+
- name: jest balancer (shard ${{ matrix.index }}/${{ matrix.total }})
66+
continue-on-error: true
1867
env:
68+
SENTRY_DSN: ${{ secrets.SENTRY_JEST_DSN }}
69+
70+
CI_NODE_TOTAL: ${{ matrix.total }}
71+
CI_NODE_INDEX: ${{ matrix.index }}
72+
1973
GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
2074
GITHUB_PR_REF: ${{ github.event.pull_request.head.ref || github.ref }}
21-
SENTRY_DSN: ${{ secrets.SENTRY_JEST_DSN }}
22-
run: pnpm run test-ci --testResultsProcessor ./tests/js/test-balancer/index.js
75+
run: pnpm run test-ci --forceExit --testResultsProcessor ./tests/js/test-balancer/resultsProcessor.ts
2376

2477
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
2578
with:
26-
name: jest-balance.json
79+
name: jest-balance-${{ matrix.index }}
2780
path: tests/js/test-balancer/jest-balance.json
81+
82+
combine-balance:
83+
needs: jest-balance
84+
runs-on: ubuntu-24.04
85+
steps:
86+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
87+
88+
- uses: ./.github/actions/setup-node-pnpm
89+
90+
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
91+
with:
92+
path: artifacts
93+
pattern: jest-balance-*
94+
95+
- name: Combine balance files
96+
run: node tests/js/test-balancer/combine.ts artifacts
97+
98+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
99+
with:
100+
name: jest-balance.json
101+
path: jest-balance.json

0 commit comments

Comments
 (0)