Skip to content

Commit c7a955b

Browse files
authored
Merge branch 'master' into releng/release-notes
2 parents 760a4a8 + 2f26318 commit c7a955b

36 files changed

+538
-314
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
COMPOSE_PROJECT_NAME=sentry-self-hosted
2+
# Set COMPOSE_PROFILES to "feature-complete" to enable all features
3+
# To enable errors monitoring only, set COMPOSE_PROFILES=errors-only
4+
# See https://develop.sentry.dev/self-hosted/experimental/errors-only/
25
COMPOSE_PROFILES=feature-complete
36
SENTRY_EVENT_RETENTION_DAYS=90
47
# You can either use a port number or an IP:PORT combo for SENTRY_BIND

.github/ISSUE_TEMPLATE/problem-report.yml

+16-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body:
2323
id: docker_version
2424
attributes:
2525
label: Docker Version
26-
placeholder: 20.10.16 ← should look like this
26+
placeholder: 20.10.16 ← should look like this (docker --version)
2727
description: |
2828
What version of docker are you using to run self-hosted?
2929
e.g: (docker --version)
@@ -39,6 +39,16 @@ body:
3939
e.g: (docker compose version)
4040
validations:
4141
required: true
42+
- type: checkboxes
43+
id: machine_specification
44+
attributes:
45+
label: Machine Specification
46+
description: Make sure your system meets the [minimum system requirements of Sentry](https://develop.sentry.dev/self-hosted/#required-minimum-system-resources).
47+
options:
48+
- label: My system meets the minimum system requirements of Sentry
49+
required: true
50+
validations:
51+
required: true
4252
- type: textarea
4353
id: repro
4454
attributes:
@@ -54,6 +64,8 @@ body:
5464
id: expected
5565
attributes:
5666
label: Expected Result
67+
description: |
68+
What did you expect to happen?
5769
validations:
5870
required: true
5971
- type: textarea
@@ -70,7 +82,7 @@ body:
7082
- logs output
7183
validations:
7284
required: true
73-
- type: textarea
85+
- type: input
7486
id: event_id
7587
attributes:
7688
label: Event ID
@@ -82,5 +94,7 @@ body:
8294
value: |-
8395
## Thanks
8496
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
97+
98+
If you're reporting a security issue, please follow our [security policy](https://github.com/getsentry/.github/blob/main/SECURITY.md) instead.
8599
validations:
86100
required: false

.github/dependabot.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ updates:
66
interval: daily
77
open-pull-requests-limit: 0 # only security updates
88
reviewers:
9-
- "@getsentry/open-source"
9+
- "@getsentry/dev-infra"
1010
- "@getsentry/security"
1111

1212
- package-ecosystem: "github-actions"
@@ -15,5 +15,5 @@ updates:
1515
# Check for updates to GitHub Actions every week
1616
interval: "weekly"
1717
reviewers:
18-
- "@getsentry/open-source"
18+
- "@getsentry/dev-infra"
1919
- "@getsentry/security"

.github/workflows/release.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,21 @@ jobs:
1919
runs-on: ubuntu-latest
2020
name: "Release a new version"
2121
steps:
22+
- name: Get auth token
23+
id: token
24+
uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
25+
with:
26+
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
27+
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
2228
- uses: actions/checkout@v4
2329
with:
24-
token: ${{ secrets.GH_RELEASE_PAT }}
30+
token: ${{ steps.token.outputs.token }}
2531
fetch-depth: 0
2632
- name: Prepare release
2733
id: prepare-release
2834
uses: getsentry/action-prepare-release@v1
2935
env:
30-
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
36+
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
3137
with:
3238
version: ${{ github.event.inputs.version }}
3339
force: ${{ github.event.inputs.force }}
@@ -42,7 +48,6 @@ jobs:
4248
steps:
4349
- uses: actions/checkout@v4
4450
with:
45-
token: ${{ secrets.GH_RELEASE_PAT }}
4651
fetch-depth: 0
4752
- uses: getsentry/action-release@v1
4853
env:

.github/workflows/test.yml

+12-115
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,15 @@ on:
1010
pull_request:
1111
schedule:
1212
- cron: "0 0,12 * * *"
13+
14+
concurrency:
15+
group: ${{ github.ref_name || github.sha }}
16+
cancel-in-progress: true
17+
1318
defaults:
1419
run:
1520
shell: bash
1621
jobs:
17-
e2e-test:
18-
if: github.repository_owner == 'getsentry'
19-
runs-on: ubuntu-22.04
20-
name: "Sentry self-hosted end-to-end tests"
21-
steps:
22-
- name: Checkout
23-
uses: actions/checkout@v4
24-
with:
25-
path: self-hosted
26-
27-
- name: End to end tests
28-
uses: getsentry/action-self-hosted-e2e-tests@main
29-
with:
30-
project_name: self-hosted
31-
3222
unit-test:
3323
if: github.repository_owner == 'getsentry'
3424
runs-on: ubuntu-22.04
@@ -37,123 +27,30 @@ jobs:
3727
- name: Checkout
3828
uses: actions/checkout@v4
3929

40-
- name: Unit Tests
41-
run: ./unit-test.sh
42-
43-
upgrade-test:
44-
if: github.repository_owner == 'getsentry'
45-
runs-on: ubuntu-22.04
46-
name: "Sentry upgrade test"
47-
env:
48-
REPORT_SELF_HOSTED_ISSUES: 0
49-
steps:
50-
- name: Get latest self-hosted release version
51-
run: |
52-
LATEST_TAG=$(curl -s https://api.github.com/repos/getsentry/self-hosted/releases/latest | jq -r '.tag_name')
53-
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
54-
55-
- name: Checkout latest release
56-
uses: actions/checkout@v4
57-
with:
58-
ref: ${{ env.LATEST_TAG }}
59-
6030
- name: Get Compose
61-
run: |
62-
# Docker Compose v1 is installed here, remove it
63-
sudo rm -f "/usr/local/bin/docker-compose"
64-
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
65-
sudo mkdir -p "/usr/local/lib/docker/cli-plugins"
66-
sudo curl -L https://github.com/docker/compose/releases/download/v2.26.0/docker-compose-`uname -s`-`uname -m` -o "/usr/local/lib/docker/cli-plugins/docker-compose"
67-
sudo chmod +x "/usr/local/lib/docker/cli-plugins/docker-compose"
68-
69-
- name: Install ${{ env.LATEST_TAG }}
70-
run: ./install.sh
31+
uses: ./get-compose-action
7132

72-
- name: Checkout current ref
73-
uses: actions/checkout@v4
74-
75-
- name: Install current ref
76-
run: ./install.sh
33+
- name: Unit Tests
34+
run: ./unit-test.sh
7735

7836
integration-test:
7937
if: github.repository_owner == 'getsentry'
8038
runs-on: ubuntu-22.04
81-
name: integration test ${{ matrix.compose_version }} - customizations ${{ matrix.customizations }}
82-
strategy:
83-
fail-fast: false
84-
matrix:
85-
customizations: ["disabled", "enabled"]
86-
compose_version: ["v2.19.0", "v2.26.0"]
87-
include:
88-
- compose_version: "v2.19.0"
89-
compose_path: "/usr/local/lib/docker/cli-plugins"
90-
- compose_version: "v2.26.0"
91-
compose_path: "/usr/local/lib/docker/cli-plugins"
39+
name: integration test
9240
env:
93-
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
9441
REPORT_SELF_HOSTED_ISSUES: 0
9542
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }}
9643
steps:
9744
- name: Checkout
9845
uses: actions/checkout@v4
9946

100-
- name: Setup dev environment
101-
run: |
102-
pip install -r requirements-dev.txt
103-
echo "PY_COLORS=1" >> "$GITHUB_ENV"
104-
### pytest-sentry configuration ###
105-
if [ "$GITHUB_REPOSITORY" = "getsentry/self-hosted" ]; then
106-
echo "PYTEST_SENTRY_DSN=$SELF_HOSTED_TESTING_DSN" >> $GITHUB_ENV
107-
echo "PYTEST_SENTRY_TRACES_SAMPLE_RATE=0" >> $GITHUB_ENV
108-
109-
# This records failures on master to sentry in order to detect flakey tests, as it's
110-
# expected that people have failing tests on their PRs
111-
if [ "$GITHUB_REF" = "refs/heads/master" ]; then
112-
echo "PYTEST_SENTRY_ALWAYS_REPORT=1" >> $GITHUB_ENV
113-
fi
114-
fi
115-
116-
- name: Get Compose
117-
run: |
118-
# Always remove `docker compose` support as that's the newer version
119-
# and comes installed by default nowadays.
120-
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
121-
# Docker Compose v1 is installed here, remove it
122-
sudo rm -f "/usr/local/bin/docker-compose"
123-
sudo rm -f "${{ matrix.compose_path }}/docker-compose"
124-
sudo mkdir -p "${{ matrix.compose_path }}"
125-
sudo curl -L https://github.com/docker/compose/releases/download/${{ matrix.compose_version }}/docker-compose-`uname -s`-`uname -m` -o "${{ matrix.compose_path }}/docker-compose"
126-
sudo chmod +x "${{ matrix.compose_path }}/docker-compose"
127-
128-
- name: Install self-hosted
129-
uses: nick-fields/retry@v3
47+
- name: Use action from local checkout
48+
uses: './'
13049
with:
131-
timeout_minutes: 10
132-
max_attempts: 3
133-
command: ./install.sh
134-
135-
- name: Integration Test
136-
run: |
137-
if [ "${{ matrix.compose_version }}" = "v2.19.0" ]; then
138-
pytest --reruns 3 --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
139-
else
140-
pytest --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
141-
fi
50+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
14251

14352
- name: Inspect failure
14453
if: failure()
14554
run: |
14655
docker compose ps
14756
docker compose logs
148-
149-
- name: Upload coverage to Codecov
150-
uses: codecov/codecov-action@v4
151-
with:
152-
token: ${{ secrets.CODECOV_TOKEN }}
153-
slug: getsentry/self-hosted
154-
155-
- name: Upload test results to Codecov
156-
if: ${{ !cancelled() }}
157-
uses: codecov/test-results-action@v1
158-
with:
159-
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ data/
8989
sentry/sentry.conf.py
9090
sentry/config.yml
9191
sentry/*.bak
92+
sentry/backup.json
9293
sentry/enhance-image.sh
9394
sentry/requirements.txt
9495
relay/credentials.json

CHANGELOG.md

+82
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,87 @@
11
# Changelog
22

3+
## 25.2.0
4+
5+
### Various fixes & improvements
6+
7+
- build(deps): bump actions/create-github-app-token from 1.11.2 to 1.11.3 (#3569) by @dependabot
8+
- feat: merge `.env` and `.env.custom` file during installation (#3564) by @aldy505
9+
- build(deps): bump actions/create-github-app-token from 1.11.1 to 1.11.2 (#3561) by @dependabot
10+
- feat: Require both inputs to be set on action (#3554) by @BYK
11+
- ref: Simpler and more accurate cache keys (#3553) by @BYK
12+
- Hand off open-source to dev-infra (#3549) by @chadwhitacre
13+
- ci: Remove obsolete `dcr up -w` from import test (#3544) by @BYK
14+
- fix: github.action_path may not have trailing slash (#3547) by @BYK
15+
- chore: Remove upgrade test (#3541) by @hubertdeng123
16+
- fix: Use correct path for get compose action (#3539) by @hubertdeng123
17+
- fix: Caching of sentry migrations should cover additional folders (#3542) by @hubertdeng123
18+
- ci: Move self-contained action reference to master branch (#3538) by @BYK
19+
- breaking: Upgrade min Compose version to 2.23.2 (#3535) by @BYK
20+
- ci: Even better cache keys and granular caching (#3534) by @BYK
21+
- test: Reorganize backup/restore tests for speed and reliability (#3537) by @BYK
22+
23+
## 25.1.0
24+
25+
### Various fixes & improvements
26+
27+
- ci: Use generic Docker volume cache action (#3524) by @BYK
28+
- ci: Less volatile cache keys (#3522) by @BYK
29+
- docs: include regular env file on wrap-up (#3523) by @aldy505
30+
- ci: Faster and smarter backup/restore tests (#3516) by @BYK
31+
- fix: Fix the new e2e action to be portable (#3520) by @BYK
32+
- ci: Move e2e test action into the repo (#3519) by @BYK
33+
- ci: Only test on compose 2.26 w/ customizations (#3506) by @BYK
34+
- ci: Skip DB ops during install completely on cache hit (#3496) by @BYK
35+
- chore: Remove everything zookeeper (#3499) by @hubertdeng123
36+
- ci: Cache postgres volume after first migration (#3488) by @BYK
37+
- fix: Remove the extra space in the log file names (#3212) by @melnele
38+
- ref(snuba): Combine bootstrap & migrate for faster bootstrap (#3491) by @BYK
39+
- ref(geoip): Remove geoipupdate from compose (#3490) by @BYK
40+
- build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1 (#3492) by @dependabot
41+
42+
## 24.12.1
43+
44+
### Various fixes & improvements
45+
46+
- chore: clearer message for errors-only mode (#3487) by @aldy505
47+
- chore(relay): provide opt-in max_memory_percent config as workaround for failing healthcheck (#3486) by @aldy505
48+
- fix(nginx): _assets should rewrite to _static/sentry/dist (#3483) by @BYK
49+
50+
## 24.12.0
51+
52+
- No documented changes.
53+
54+
## 24.11.2
55+
56+
### Various fixes & improvements
57+
58+
- fix(redis): Actually use custom config (#3459) by @BYK
59+
- feat(release): Replace release bot with GH app (#3458) by @Jeffreyhung
60+
- chore(issue-template): ask for machine specification and provide link to security policy (#3447) by @aldy505
61+
- add sentry/backup.json to gitignore (#3450) by @niklassc7
62+
- ref: remove suggested fix (#3446) by @aldy505
63+
64+
## 24.11.1
65+
66+
### Various fixes & improvements
67+
68+
- fix(redis): Use a safer eviction rule (#3432) by @BYK
69+
- feat: add Redis configuration for improved memory management (#3427) by @Hassanzadeh-sd
70+
- build(deps): bump codecov/codecov-action from 4 to 5 (#3429) by @dependabot
71+
72+
## 24.11.0
73+
74+
### Various fixes & improvements
75+
76+
- feat(healthcheck): Improve redis healthcheck (#3422) by @hubertdeng123
77+
- fix: missing mime types and turning off autoindex for js-sdk endpoint (#3395) by @aldy505
78+
- fix: Use js.sentry-cdn.com for JS SDK downloads (#3417) by @BYK
79+
- fix(loader): provide js sdk assets from 4.x (#3415) by @aldy505
80+
- Revert "Revert "ref(feedback): remove issue platform flags after releasing issue types"" (#3403) by @BYK
81+
- Revert "ref(feedback): remove issue platform flags after releasing issue types" (#3402) by @BYK
82+
- ref(feedback): remove issue platform flags after releasing issue types (#3397) by @aliu39
83+
- fix(sentry-admin): Do not wait for command finish to display output (#3390) by @Makhonya
84+
385
## 24.10.0
486

587
### Various fixes & improvements

CONTRIBUTING.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
## Testing
22

3-
Validate changes to the setup by running the integration test:
3+
### Running Tests with Pytest
44

5-
```shell
6-
./integration-test.sh
5+
We use pytest for running tests. To run the tests:
6+
7+
1) Ensure that you are in the root directory of the project.
8+
2) Run the following command:
9+
```bash
10+
pytest
711
```
12+
13+
This will automatically discover and run all test cases in the project.

0 commit comments

Comments
 (0)