Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Initial self-hosted end-to-end Github Action #42124

Merged
merged 11 commits into from
Dec 9, 2022
56 changes: 56 additions & 0 deletions .github/workflows/self-hosted-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Self-hosted Sentry end to end tests
on:
push:
branches:
- master
- releases/**
pull_request:

# Cancel in progress workflows on pull_requests.
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
self-hosted-end-to-end:
name: self-hosted tests
runs-on: ubuntu-20.04
# temporary, remove once we are confident the action is working
continue-on-error: true
timeout-minutes: 30
hubertdeng123 marked this conversation as resolved.
Show resolved Hide resolved
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0

- name: Check for backend file changes
uses: getsentry/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
id: changes
with:
token: ${{ github.token }}
filters: .github/file-filters.yml

- name: Pull the test image
if: steps.changes.outputs.backend_all == 'true'
id: image_pull
env:
SENTRY_TEST_IMAGE: us.gcr.io/sentryio/sentry:${{ github.event.pull_request.head.sha || github.sha }}
run: |
echo "We poll for the Sentry Docker image that the GCB build produces until it succeeds or this job times out."
if [[ -z "$SENTRY_TEST_IMAGE" ]]; then
echo "The SENTRY_TEST_IMAGE needs to be set" 1>&2
exit 1
fi
echo "Polling for $SENTRY_TEST_IMAGE"
until docker pull "$SENTRY_TEST_IMAGE" 2>/dev/null; do
sleep 10
done
echo "sentry-test-image-name=$SENTRY_TEST_IMAGE" >> "$GITHUB_OUTPUT"

# TODO: push the image here
- name: Run Sentry self-hosted e2e CI
if: steps.changes.outputs.backend_all == 'true'
uses: getsentry/action-self-hosted-e2e-tests@fa5b8240848f0e645ac2918c530e60ec8f50e4b8
with:
project_name: sentry
local_image: ${{ steps.image_pull.outputs.sentry-test-image-name }}
docker_repo: docker.io/getsentry/sentry
4 changes: 2 additions & 2 deletions src/sentry/event_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2209,8 +2209,8 @@ def _save_grouphash_and_group(
def _message_from_metadata(meta: Mapping[str, str]) -> str:
title = meta.get("title", "")
location = meta.get("location", "")
seperator = ": " if title and location else ""
return f"{title}{seperator}{location}"
separator = ": " if title and location else ""
return f"{title}{separator}{location}"


@metrics.wraps("save_event.save_aggregate_performance")
Expand Down