Skip to content

Commit 9523b3a

Browse files
authored
Merge branch 'master' into mifu67/aci/subscription-processor-tests
2 parents da4afe4 + e22ecb2 commit 9523b3a

File tree

2,676 files changed

+73741
-41562
lines changed

Some content is hidden

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

2,676 files changed

+73741
-41562
lines changed

.craft.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,4 @@ statusProvider:
1212
artifactProvider:
1313
name: none
1414
targets:
15-
- id: release
16-
name: docker
17-
source: ghcr.io/getsentry/sentry
18-
target: getsentry/sentry
19-
- id: latest
20-
name: docker
21-
source: ghcr.io/getsentry/sentry
22-
target: getsentry/sentry
23-
targetFormat: '{{{target}}}:latest'
2415
- name: github

.cursor/rules/tsx_tests.mdc renamed to .cursor/rules/typescript_tests.mdc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030

3131
- **User-centric testing**: Write tests that resemble how users interact with the app.
3232
- **Avoid implementation details**: Focus on behavior, not internal component structure.
33+
- **Do not share state between tests**: Behavior should not be influenced by other tests in the test suite.
3334

3435
## Query Priority (in order of preference)
3536

@@ -99,6 +100,23 @@ PageFiltersStore.onInitializeUrlState(
99100
)
100101
```
101102

103+
### Use fixtures
104+
105+
Sentry fixtures are located in tests/js/fixtures/ while GetSentry fixtures are located in tests/js/getsentry-test/fixtures/.
106+
107+
```tsx
108+
109+
// ❌ Don't import type and initialize it
110+
import type {Project} from 'sentry/types/project';
111+
const project: Project = {...}
112+
113+
// ✅ Import a fixture instead
114+
import {ProjectFixture} from 'sentry-fixture/project';
115+
116+
const project = ProjectFixture(partialProject)
117+
118+
```
119+
102120
### Use `screen` instead of destructuring
103121
```tsx
104122
// ❌ Don't do this

.git-blame-ignore-revs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@ eb55184602940adb1fc09a9c0e33515cac92c7d8
9696
c8a00d1cf64a349276060458ca51dab9e2538f3e
9797
# ref: perform non-typing --py311-plus pyupgrades (#64164)
9898
b5e15e8611ff64f8d4e2cde8365f92f7769c9c20
99+
# feat(dx): Move dashboard endpoints to dashboard module #97394
100+
fe2eb237aee31a1fca51774660a91d13d1b3ecc5
101+
# ref(dx): Move avatar endpoint into core module (#97437)
102+
b4914e559b6e70675452d8ed750fbf70ec703f27
103+
# ref(dx): Move core team endpoints to core module (#97433)
104+
4a825dfd62b6d61e48982d014f7d7383f61982f2
105+
# ref(dx): Move project core endpoints to core module (#97419)
106+
7dcda5dd9a861130d657ccc2468eb61f55be76b9
107+
# feat(dx): Move various organization endpoints to "core" (#97407)
108+
8592e74bbd014d1d44b7cd973379e5278ceb5b41

.github/CODEOWNERS

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ vercel.json @getsentry/owners-js-bu
117117
babel.config.* @getsentry/owners-js-build
118118
build-utils/ @getsentry/owners-js-build
119119
eslint.config.mjs @getsentry/owners-js-build
120+
jest-balance.json @getsentry/owners-js-build
120121
jest.config.ts @getsentry/owners-js-build
121122
tsconfig.* @getsentry/owners-js-build
122123
.node-version @getsentry/owners-js-deps
@@ -232,8 +233,8 @@ pnpm-lock.yaml @getsentry/owners-js-de
232233
/src/sentry/search/events/ @getsentry/visibility
233234
/src/sentry/search/eap/ @getsentry/visibility
234235

235-
/src/sentry/performance_issues/ @getsentry/performance @getsentry/issue-detection-backend
236-
/tests/sentry/performance_issues/ @getsentry/performance @getsentry/issue-detection-backend
236+
/src/sentry/performance_issues/ @getsentry/issue-detection-backend
237+
/tests/sentry/performance_issues/ @getsentry/issue-detection-backend
237238

238239
/static/app/components/events/eventStatisticalDetector/ @getsentry/visibility @getsentry/profiling
239240

@@ -245,13 +246,8 @@ pnpm-lock.yaml @getsentry/owners-js-de
245246

246247
/src/sentry/api/bases/organization_events.py @getsentry/visibility
247248

248-
/src/sentry/api/endpoints/organization_dashboards.py @getsentry/dashboards
249-
/src/sentry/api/endpoints/organization_dashboard_details.py @getsentry/dashboards
250-
/src/sentry/api/endpoints/organization_dashboard_widget_details.py @getsentry/dashboards
251-
252-
tests/sentry/api/endpoints/test_organization_dashboards.py @getsentry/dashboards
253-
tests/sentry/api/endpoints/test_organization_dashboard_details.py @getsentry/dashboards
254-
tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py @getsentry/dashboards
249+
/src/sentry/dashboards/ @getsentry/dashboards
250+
/tests/sentry/dashboards/ @getsentry/dashboards
255251

256252
/src/sentry/api/serializers/models/dashboard.py @getsentry/dashboards
257253
/src/sentry/api/serializers/models/discoversavedquery.py @getsentry/visibility
@@ -680,4 +676,6 @@ tests/sentry/api/endpoints/test_organization_dashboard_widget_details.py @ge
680676
/static/app/components/core/ @getsentry/design-engineering
681677
/static/app/icons/ @getsentry/design-engineering
682678
/static/app/stories/ @getsentry/design-engineering
679+
/static/.cursor/BUGBOT.md @getsentry/design-engineering
680+
/static/CLAUDE.md @getsentry/design-engineering
683681
## End of Frontend Platform

.github/dependency-review-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fail-on-severity: high
2+
3+
allow-ghsas:
4+
# doesn't apply; we don't use the pure python wheel
5+
- GHSA-8qvm-5x2c-j2w7

.github/workflows/self-hosted.yml

Lines changed: 15 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,18 @@ jobs:
7474
python3 -m tools.fast_editable --path .
7575
python3 -m sentry.build.main
7676
77-
- run: docker login --username '${{ github.actor }}' --password '${{ github.token }}' ghcr.io
78-
if: github.ref_name == 'master' && github.event_name != 'pull_request'
79-
80-
- name: Set up Docker Buildx
81-
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
82-
83-
- name: Build
84-
uses: docker/build-push-action@32945a339266b759abcbdc89316275140b0fc960 # v6.8.10
77+
- uses: getsentry/action-build-and-push-images@6a8b87ba640ef1a79854ce57a7ba4411deb84762
8578
with:
86-
context: .
87-
file: 'self-hosted/Dockerfile'
88-
cache-from: ghcr.io/getsentry/sentry:latest
89-
cache-to: type=inline
79+
image_name: 'sentry'
9080
platforms: linux/${{ matrix.platform }}
91-
tags: sentry:${{ matrix.platform }}
92-
outputs: type=docker,dest=/tmp/sentry-${{ matrix.platform }}.tar
93-
push: false
94-
build-args: |
81+
dockerfile_path: 'self-hosted/Dockerfile'
82+
tag_suffix: -${{ matrix.platform }}
83+
build_args: |
9584
SOURCE_COMMIT=${{ github.sha }}
9685
TARGETARCH=${{ matrix.platform }}
97-
98-
- name: Upload Image
99-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
100-
with:
101-
name: sentry-${{ matrix.platform }}
102-
path: /tmp/sentry-${{ matrix.platform }}.tar
86+
ghcr: true
87+
tag_nightly: false
88+
tag_latest: false
10389

10490
assemble:
10591
needs: [self-hosted]
@@ -117,101 +103,11 @@ jobs:
117103
- name: Set up Docker Buildx
118104
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
119105

120-
- name: Download amd64 Image
121-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.2
122-
with:
123-
name: sentry-amd64
124-
path: /tmp
125-
126-
- name: Load amd64 Image
127-
run: docker load --input /tmp/sentry-amd64.tar
128-
129-
- name: Download arm64 Image
130-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.2
131-
with:
132-
name: sentry-arm64
133-
path: /tmp
134-
135-
- name: Load arm64 Image
136-
run: docker load --input /tmp/sentry-arm64.tar
137-
138-
- name: Push to GitHub Container Registry
106+
- name: Create multiplatform manifests
139107
run: |
140-
docker tag sentry:amd64 ghcr.io/getsentry/sentry:${{ github.sha }}-amd64
141-
docker push ghcr.io/getsentry/sentry:${{ github.sha }}-amd64
142-
143-
docker tag sentry:arm64 ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
144-
docker push ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
145-
146-
docker manifest create \
147-
ghcr.io/getsentry/sentry:${{ github.sha }} \
148-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
149-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
150-
151-
docker manifest push ghcr.io/getsentry/sentry:${{ github.sha }}
152-
153-
docker manifest create \
154-
ghcr.io/getsentry/sentry:latest \
155-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
156-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
157-
158-
docker manifest push ghcr.io/getsentry/sentry:latest
159-
160-
docker manifest create \
161-
ghcr.io/getsentry/sentry:nightly \
162-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
163-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
164-
165-
docker manifest push ghcr.io/getsentry/sentry:nightly
166-
167-
# These manifests below are being used for development purposes.
168-
# We shall keep it as is.
169-
docker manifest create \
170-
ghcr.io/getsentry/sentry-self-hosted:${{ github.sha }} \
171-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
172-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
173-
174-
docker manifest push ghcr.io/getsentry/sentry-self-hosted:${{ github.sha }}
175-
176-
docker manifest create \
177-
ghcr.io/getsentry/sentry-self-hosted:latest \
178-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
179-
--amend ghcr.io/getsentry/sentry:${{ github.sha }}-arm64
180-
181-
docker manifest push ghcr.io/getsentry/sentry-self-hosted:latest
182-
183-
publish-dockerhub:
184-
needs: [assemble]
185-
runs-on: ubuntu-latest
186-
if: ${{ (github.ref_name == 'master') }}
187-
steps:
188-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
189-
- name: Get short SHA for docker tag
190-
id: short_sha
191-
shell: bash
192-
run: |
193-
SHORT_SHA=$(git rev-parse --short "$GITHUB_SHA")
194-
if [[ -z "$SHORT_SHA" ]]; then
195-
echo "Short SHA empty? Re-running rev-parse."
196-
git rev-parse --short "$GITHUB_SHA"
197-
else
198-
echo "sha=$SHORT_SHA" >> $GITHUB_OUTPUT
199-
fi
200-
- name: Push built docker image
201-
shell: bash
202-
env:
203-
SHORT_SHA: ${{ steps.short_sha.outputs.sha }}
204-
IMAGE_URL: ghcr.io/getsentry/sentry-self-hosted:${{ github.sha }}
205-
run: |
206-
# only login if the password is set
207-
if [[ "${{ secrets.DOCKER_HUB_RW_TOKEN }}" ]]; then echo "${{ secrets.DOCKER_HUB_RW_TOKEN }}" | docker login --username=sentrybuilder --password-stdin; fi
208-
209-
# We push 3 tags to Dockerhub:
210-
# first, the full sha of the commit
211-
docker buildx imagetools create --tag getsentry/sentry:${GITHUB_SHA} ghcr.io/getsentry/sentry:${{ github.sha }}
212-
213-
# second, the short sha of the commit
214-
docker buildx imagetools create --tag getsentry/sentry:${SHORT_SHA} ghcr.io/getsentry/sentry:${{ github.sha }}
215-
216-
# finally, nightly
217-
docker buildx imagetools create --tag getsentry/sentry:nightly ghcr.io/getsentry/sentry:${{ github.sha }}
108+
docker buildx imagetools create \
109+
--tag ghcr.io/getsentry/sentry:${{ github.sha }} \
110+
--tag ghcr.io/getsentry/sentry:nightly \
111+
--tag ghcr.io/getsentry/sentry:latest \
112+
ghcr.io/getsentry/sentry:${{ github.sha }}-amd64 \
113+
ghcr.io/getsentry/sentry:${{ github.sha }}-arm64

.pre-commit-config.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,7 @@ repos:
6161
entry: python -m tools.lint_requirements
6262
language: python
6363
files: requirements-.*\.txt$
64-
# exclude the overrides file from this linter -- it doesn't apply at all
65-
exclude: ^requirements-getsentry-overrides\.txt$
6664
additional_dependencies: [packaging==24.1]
67-
- id: requirements-overrides
68-
name: use pinned archives (see comment in file)
69-
stages: [pre-commit]
70-
language: pygrep
71-
entry: |
72-
(?x)
73-
^
74-
# it's a comment line
75-
(?!\#.*$)
76-
# it's a blank line
77-
(?!$)
78-
# it's a pinned archive
79-
(?![a-z-]+[ ]@[ ]https://github\.com/getsentry/[^/]+/archive/[a-f0-9]{40}\.zip$)
80-
files: ^requirements-getsentry-overrides\.txt$
8165
- id: check-mypy-bypass
8266
name: do not bypass the type checker
8367
entry: '(^# *mypy: *ignore-errors|^# *type: *ignore|\bno_type_check\b|ignore\[import-untyped\])'

0 commit comments

Comments
 (0)