Skip to content

Commit

Permalink
Merge branch 'master' into releng/release-notes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmke authored Feb 18, 2025
2 parents 760a4a8 + 2f26318 commit c7a955b
Show file tree
Hide file tree
Showing 36 changed files with 538 additions and 314 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
COMPOSE_PROJECT_NAME=sentry-self-hosted
# Set COMPOSE_PROFILES to "feature-complete" to enable all features
# To enable errors monitoring only, set COMPOSE_PROFILES=errors-only
# See https://develop.sentry.dev/self-hosted/experimental/errors-only/
COMPOSE_PROFILES=feature-complete
SENTRY_EVENT_RETENTION_DAYS=90
# You can either use a port number or an IP:PORT combo for SENTRY_BIND
Expand Down
18 changes: 16 additions & 2 deletions .github/ISSUE_TEMPLATE/problem-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ body:
id: docker_version
attributes:
label: Docker Version
placeholder: 20.10.16 ← should look like this
placeholder: 20.10.16 ← should look like this (docker --version)
description: |
What version of docker are you using to run self-hosted?
e.g: (docker --version)
Expand All @@ -39,6 +39,16 @@ body:
e.g: (docker compose version)
validations:
required: true
- type: checkboxes
id: machine_specification
attributes:
label: Machine Specification
description: Make sure your system meets the [minimum system requirements of Sentry](https://develop.sentry.dev/self-hosted/#required-minimum-system-resources).
options:
- label: My system meets the minimum system requirements of Sentry
required: true
validations:
required: true
- type: textarea
id: repro
attributes:
Expand All @@ -54,6 +64,8 @@ body:
id: expected
attributes:
label: Expected Result
description: |
What did you expect to happen?
validations:
required: true
- type: textarea
Expand All @@ -70,7 +82,7 @@ body:
- logs output
validations:
required: true
- type: textarea
- type: input
id: event_id
attributes:
label: Event ID
Expand All @@ -82,5 +94,7 @@ body:
value: |-
## Thanks
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
If you're reporting a security issue, please follow our [security policy](https://github.com/getsentry/.github/blob/main/SECURITY.md) instead.
validations:
required: false
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ updates:
interval: daily
open-pull-requests-limit: 0 # only security updates
reviewers:
- "@getsentry/open-source"
- "@getsentry/dev-infra"
- "@getsentry/security"

- package-ecosystem: "github-actions"
Expand All @@ -15,5 +15,5 @@ updates:
# Check for updates to GitHub Actions every week
interval: "weekly"
reviewers:
- "@getsentry/open-source"
- "@getsentry/dev-infra"
- "@getsentry/security"
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,21 @@ jobs:
runs-on: ubuntu-latest
name: "Release a new version"
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RELEASE_PAT }}
token: ${{ steps.token.outputs.token }}
fetch-depth: 0
- name: Prepare release
id: prepare-release
uses: getsentry/action-prepare-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_PAT }}
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
version: ${{ github.event.inputs.version }}
force: ${{ github.event.inputs.force }}
Expand All @@ -42,7 +48,6 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_RELEASE_PAT }}
fetch-depth: 0
- uses: getsentry/action-release@v1
env:
Expand Down
127 changes: 12 additions & 115 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,15 @@ on:
pull_request:
schedule:
- cron: "0 0,12 * * *"

concurrency:
group: ${{ github.ref_name || github.sha }}
cancel-in-progress: true

defaults:
run:
shell: bash
jobs:
e2e-test:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
name: "Sentry self-hosted end-to-end tests"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: self-hosted

- name: End to end tests
uses: getsentry/action-self-hosted-e2e-tests@main
with:
project_name: self-hosted

unit-test:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
Expand All @@ -37,123 +27,30 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Unit Tests
run: ./unit-test.sh

upgrade-test:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
name: "Sentry upgrade test"
env:
REPORT_SELF_HOSTED_ISSUES: 0
steps:
- name: Get latest self-hosted release version
run: |
LATEST_TAG=$(curl -s https://api.github.com/repos/getsentry/self-hosted/releases/latest | jq -r '.tag_name')
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
- name: Checkout latest release
uses: actions/checkout@v4
with:
ref: ${{ env.LATEST_TAG }}

- name: Get Compose
run: |
# Docker Compose v1 is installed here, remove it
sudo rm -f "/usr/local/bin/docker-compose"
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
sudo mkdir -p "/usr/local/lib/docker/cli-plugins"
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"
sudo chmod +x "/usr/local/lib/docker/cli-plugins/docker-compose"
- name: Install ${{ env.LATEST_TAG }}
run: ./install.sh
uses: ./get-compose-action

- name: Checkout current ref
uses: actions/checkout@v4

- name: Install current ref
run: ./install.sh
- name: Unit Tests
run: ./unit-test.sh

integration-test:
if: github.repository_owner == 'getsentry'
runs-on: ubuntu-22.04
name: integration test ${{ matrix.compose_version }} - customizations ${{ matrix.customizations }}
strategy:
fail-fast: false
matrix:
customizations: ["disabled", "enabled"]
compose_version: ["v2.19.0", "v2.26.0"]
include:
- compose_version: "v2.19.0"
compose_path: "/usr/local/lib/docker/cli-plugins"
- compose_version: "v2.26.0"
compose_path: "/usr/local/lib/docker/cli-plugins"
name: integration test
env:
COMPOSE_PROJECT_NAME: self-hosted-${{ strategy.job-index }}
REPORT_SELF_HOSTED_ISSUES: 0
SELF_HOSTED_TESTING_DSN: ${{ vars.SELF_HOSTED_TESTING_DSN }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup dev environment
run: |
pip install -r requirements-dev.txt
echo "PY_COLORS=1" >> "$GITHUB_ENV"
### pytest-sentry configuration ###
if [ "$GITHUB_REPOSITORY" = "getsentry/self-hosted" ]; then
echo "PYTEST_SENTRY_DSN=$SELF_HOSTED_TESTING_DSN" >> $GITHUB_ENV
echo "PYTEST_SENTRY_TRACES_SAMPLE_RATE=0" >> $GITHUB_ENV
# This records failures on master to sentry in order to detect flakey tests, as it's
# expected that people have failing tests on their PRs
if [ "$GITHUB_REF" = "refs/heads/master" ]; then
echo "PYTEST_SENTRY_ALWAYS_REPORT=1" >> $GITHUB_ENV
fi
fi
- name: Get Compose
run: |
# Always remove `docker compose` support as that's the newer version
# and comes installed by default nowadays.
sudo rm -f "/usr/local/lib/docker/cli-plugins/docker-compose"
# Docker Compose v1 is installed here, remove it
sudo rm -f "/usr/local/bin/docker-compose"
sudo rm -f "${{ matrix.compose_path }}/docker-compose"
sudo mkdir -p "${{ matrix.compose_path }}"
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"
sudo chmod +x "${{ matrix.compose_path }}/docker-compose"
- name: Install self-hosted
uses: nick-fields/retry@v3
- name: Use action from local checkout
uses: './'
with:
timeout_minutes: 10
max_attempts: 3
command: ./install.sh

- name: Integration Test
run: |
if [ "${{ matrix.compose_version }}" = "v2.19.0" ]; then
pytest --reruns 3 --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
else
pytest --cov --junitxml=junit.xml _integration-test/ --customizations=${{ matrix.customizations }}
fi
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Inspect failure
if: failure()
run: |
docker compose ps
docker compose logs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: getsentry/self-hosted

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ data/
sentry/sentry.conf.py
sentry/config.yml
sentry/*.bak
sentry/backup.json
sentry/enhance-image.sh
sentry/requirements.txt
relay/credentials.json
Expand Down
82 changes: 82 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,87 @@
# Changelog

## 25.2.0

### Various fixes & improvements

- build(deps): bump actions/create-github-app-token from 1.11.2 to 1.11.3 (#3569) by @dependabot
- feat: merge `.env` and `.env.custom` file during installation (#3564) by @aldy505
- build(deps): bump actions/create-github-app-token from 1.11.1 to 1.11.2 (#3561) by @dependabot
- feat: Require both inputs to be set on action (#3554) by @BYK
- ref: Simpler and more accurate cache keys (#3553) by @BYK
- Hand off open-source to dev-infra (#3549) by @chadwhitacre
- ci: Remove obsolete `dcr up -w` from import test (#3544) by @BYK
- fix: github.action_path may not have trailing slash (#3547) by @BYK
- chore: Remove upgrade test (#3541) by @hubertdeng123
- fix: Use correct path for get compose action (#3539) by @hubertdeng123
- fix: Caching of sentry migrations should cover additional folders (#3542) by @hubertdeng123
- ci: Move self-contained action reference to master branch (#3538) by @BYK
- breaking: Upgrade min Compose version to 2.23.2 (#3535) by @BYK
- ci: Even better cache keys and granular caching (#3534) by @BYK
- test: Reorganize backup/restore tests for speed and reliability (#3537) by @BYK

## 25.1.0

### Various fixes & improvements

- ci: Use generic Docker volume cache action (#3524) by @BYK
- ci: Less volatile cache keys (#3522) by @BYK
- docs: include regular env file on wrap-up (#3523) by @aldy505
- ci: Faster and smarter backup/restore tests (#3516) by @BYK
- fix: Fix the new e2e action to be portable (#3520) by @BYK
- ci: Move e2e test action into the repo (#3519) by @BYK
- ci: Only test on compose 2.26 w/ customizations (#3506) by @BYK
- ci: Skip DB ops during install completely on cache hit (#3496) by @BYK
- chore: Remove everything zookeeper (#3499) by @hubertdeng123
- ci: Cache postgres volume after first migration (#3488) by @BYK
- fix: Remove the extra space in the log file names (#3212) by @melnele
- ref(snuba): Combine bootstrap & migrate for faster bootstrap (#3491) by @BYK
- ref(geoip): Remove geoipupdate from compose (#3490) by @BYK
- build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1 (#3492) by @dependabot

## 24.12.1

### Various fixes & improvements

- chore: clearer message for errors-only mode (#3487) by @aldy505
- chore(relay): provide opt-in max_memory_percent config as workaround for failing healthcheck (#3486) by @aldy505
- fix(nginx): _assets should rewrite to _static/sentry/dist (#3483) by @BYK

## 24.12.0

- No documented changes.

## 24.11.2

### Various fixes & improvements

- fix(redis): Actually use custom config (#3459) by @BYK
- feat(release): Replace release bot with GH app (#3458) by @Jeffreyhung
- chore(issue-template): ask for machine specification and provide link to security policy (#3447) by @aldy505
- add sentry/backup.json to gitignore (#3450) by @niklassc7
- ref: remove suggested fix (#3446) by @aldy505

## 24.11.1

### Various fixes & improvements

- fix(redis): Use a safer eviction rule (#3432) by @BYK
- feat: add Redis configuration for improved memory management (#3427) by @Hassanzadeh-sd
- build(deps): bump codecov/codecov-action from 4 to 5 (#3429) by @dependabot

## 24.11.0

### Various fixes & improvements

- feat(healthcheck): Improve redis healthcheck (#3422) by @hubertdeng123
- fix: missing mime types and turning off autoindex for js-sdk endpoint (#3395) by @aldy505
- fix: Use js.sentry-cdn.com for JS SDK downloads (#3417) by @BYK
- fix(loader): provide js sdk assets from 4.x (#3415) by @aldy505
- Revert "Revert "ref(feedback): remove issue platform flags after releasing issue types"" (#3403) by @BYK
- Revert "ref(feedback): remove issue platform flags after releasing issue types" (#3402) by @BYK
- ref(feedback): remove issue platform flags after releasing issue types (#3397) by @aliu39
- fix(sentry-admin): Do not wait for command finish to display output (#3390) by @Makhonya

## 24.10.0

### Various fixes & improvements
Expand Down
12 changes: 9 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## Testing

Validate changes to the setup by running the integration test:
### Running Tests with Pytest

```shell
./integration-test.sh
We use pytest for running tests. To run the tests:

1) Ensure that you are in the root directory of the project.
2) Run the following command:
```bash
pytest
```

This will automatically discover and run all test cases in the project.
Loading

0 comments on commit c7a955b

Please sign in to comment.