Skip to content

Commit

Permalink
Revert "Revert "feat: Sync fork (#8)" (#9)"
Browse files Browse the repository at this point in the history
This reverts commit 77f75c4.
  • Loading branch information
ngudbhav authored Apr 20, 2024
1 parent 77f75c4 commit c1f35ab
Show file tree
Hide file tree
Showing 48 changed files with 1,119 additions and 406 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ WAL2JSON_VERSION=latest
HEALTHCHECK_INTERVAL=30s
HEALTHCHECK_TIMEOUT=1m30s
HEALTHCHECK_RETRIES=10
# Caution: Raising max connections of postgres increases CPU and RAM usage
# see https://github.com/getsentry/self-hosted/pull/2740 for more information
POSTGRES_MAX_CONNECTIONS=100
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/problem-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ body:
placeholder: 2.6.0 ← should look like this (docker compose version)
description: |
What version of docker compose are you using to run self-hosted?
e.g: (docker compose version)
validations:
required: true
- type: textarea
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ postgres/wal2json
# integration testing
_integration-test/custom-ca-roots/nginx/*
sentry/test-custom-ca-roots.py

# OSX minutia
.DS_Store
2 changes: 1 addition & 1 deletion .platform/confighooks/prebuild/01_prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
/opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' > .env
printf "SENTRY_IMAGE=getsentry/sentry:23.12.1" >> .env
printf "SENTRY_IMAGE=getsentry/sentry:24.4.1" >> .env
set -a
source .env
set +a
Expand Down
2 changes: 1 addition & 1 deletion .platform/confighooks/predeploy/01_loadenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
/opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' > .env
printf "SENTRY_IMAGE=getsentry/sentry:23.12.1" >> .env
printf "SENTRY_IMAGE=getsentry/sentry:24.4.1" >> .env
set -a
source .env
set +a
Expand Down
2 changes: 1 addition & 1 deletion .platform/hooks/prebuild/01_prebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
/opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' > .env
printf "SENTRY_IMAGE=getsentry/sentry:23.12.1" >> .env
printf "SENTRY_IMAGE=getsentry/sentry:24.4.1" >> .env
set -a
source .env
set +a
Expand Down
2 changes: 1 addition & 1 deletion .platform/hooks/predeploy/01_loadenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -e
/opt/elasticbeanstalk/bin/get-config environment | jq -r 'to_entries | .[] | "\(.key)=\"\(.value)\""' > .env
printf "SENTRY_IMAGE=getsentry/sentry:23.12.1" >> .env
printf "SENTRY_IMAGE=getsentry/sentry:24.4.1" >> .env
set -a
source .env
set +a
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,66 @@
# Changelog

## 24.4.1

### Various fixes & improvements

- chore(deps): bump memcached and redis to latest patch versions (#2973) by @mdtro
- Use docker compose exec to create additional kafka topics (#2904) by @saz
- Add example to docker compose version in problem report (#2959) by @edgariscoding
- Port last integration tests to python (#2966) by @hubertdeng123

## 24.4.0

### Various fixes & improvements

- Use python for e2e tests (#2953) by @hubertdeng123
- feat: adds group attributes consumer (#2927) by @scefali
- fix(spans): Adds organizations:standalone-span-ingestion flag to default config (#2936) by @edwardgou-sentry
- Bump ubuntu version for tests (#2923) by @hubertdeng123
- Write Customization tests in python (#2918) by @hubertdeng123
- feat(clickhouse): Added max_suspicious_broken_parts to the config.xml (#2853) by @victorelec14
- Port backup tests to python (#2907) by @hubertdeng123
- Fix defunct java processes (#2914) by @hubertdeng123
- Integration tests in python (#2892) by @hubertdeng123
- feat: run outcomes-billing consumer (#2909) by @lynnagara
- Remove duplicate feature flags (#2899) by @JannKleen

## 24.3.0

### Various fixes & improvements

- feat(spans): Ingest spans (#2861) by @phacops
- Integration test improvements (#2858) by @hubertdeng123
- increase postgres max_connections above 100 connections (#2740) by @erfantkerfan
- deps: bump maxmind/geoipupdate to 6.1.0 (#2859) by @victorelec14
- Enable proxy buffering in nginx (#2844) by @RexTim
- Add snuba rust consumers (#2831) by @hubertdeng123
- simplify if for open-ai-suggestion (#2732) by @LvckyAPI
- Upgrade to FSL-1.1 (#2835) by @chadwhitacre
- chore: provide clearer csrf url example (#2833) by @aldy505
- chore: Use django ORM to perform sql commands (#2827) by @hubertdeng123
- revert changes in 3067683f6c0e1c6dd9ceb72cb5155c1dbf3bf501 (#2829) by @hubertdeng123
- use rust consumers in self-hosted (3067683f) by @hubertdeng123

## 24.2.0

### Various fixes & improvements

- Bump nginx version (#2797) by @hubertdeng123
- build(deps): bump pre-commit/action from 3.0.0 to 3.0.1 (#2788) by @dependabot
- Tweak postgres indexing fix (#2792) by @hubertdeng123
- fix: DB migration script (#2779) by @hubertdeng123

## 24.1.2

### Various fixes & improvements

- Check memcached backend in Django (#2778) by @chadwhitacre
- Fix groupedmessage indexing error (#2777) by @hubertdeng123
- build(deps): bump actions/setup-python from 4 to 5 (#2644) by @dependabot
- feat: provide csrf settings information for sentry config (#2762) by @aldy505
- Fix apt config generation when http_proxy is set (#2725) (#2734) by @lemrouch

## 24.1.1

### Various fixes & improvements
Expand Down
37 changes: 17 additions & 20 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Functional Source License, Version 1.0, Apache 2.0 Change License
# Functional Source License, Version 1.1, Apache 2.0 Future License

## Abbreviation

FSL-1.0-Apache-2.0
FSL-1.1-Apache-2.0

## Notice

Copyright 2016-2023 Functional Software, Inc. dba Sentry
Copyright 2016-2024 Functional Software, Inc. dba Sentry

## Terms and Conditions

Expand All @@ -30,18 +30,15 @@ and redistribute the Software for any Permitted Purpose identified below.
### Permitted Purpose

A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
means use of the Software in or for a commercial product or service that
competes with the Software or any other product or service we offer using the
Software as of the date we make the Software available.
means making the Software available to others in a commercial product or
service that:

Competing Uses specifically include using the Software:
1. substitutes for the Software;

1. as a substitute for any of our products or services;
2. substitutes for any other product or service we offer using the Software
that exists as of the date we make the Software available; or

2. in a way that exposes the APIs of the Software; and

3. in a product or service that offers the same or substantially similar
functionality to the Software.
3. offers the same or substantially similar functionality as the Software.

Permitted Purposes specifically include using the Software:

Expand All @@ -51,9 +48,8 @@ Permitted Purposes specifically include using the Software:

3. for non-commercial research; and

4. in connection with software development services or managed services that
you provide to a licensee using the Software in accordance with these Terms
and Conditions.
4. in connection with professional services that you provide to a licensee
using the Software in accordance with these Terms and Conditions.

### Patents

Expand Down Expand Up @@ -88,12 +84,13 @@ Except for displaying the License Details and identifying us as the origin of
the Software, you have no right under these Terms and Conditions to use our
trademarks, trade names, service marks or product names.

## Change License
## Grant of Future License

On the second anniversary of the date we make the Software available, the
Software will become available under the Apache 2.0 license. On that date, the
Terms and Conditions above automatically terminate and the following terms
become effective:
We hereby irrevocably grant you an additional license to use the Software under
the Apache License, Version 2.0 that is effective on the second anniversary of
the date we make the Software available. On or after that date, you may use the
Software under the Apache License, Version 2.0, in which case the following
will apply:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License.
Expand Down
82 changes: 82 additions & 0 deletions _integration-test/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
import os
import subprocess
import time

import httpx
import pytest

SENTRY_CONFIG_PY = "sentry/sentry.conf.py"
SENTRY_TEST_HOST = os.getenv("SENTRY_TEST_HOST", "http://localhost:9000")
TEST_USER = "[email protected]"
TEST_PASS = "test123TEST"
TIMEOUT_SECONDS = 60


def pytest_addoption(parser):
parser.addoption("--customizations", default="disabled")


@pytest.fixture(scope="session", autouse=True)
def configure_self_hosted_environment(request):
subprocess.run(
["docker", "compose", "--ansi", "never", "up", "-d"],
check=True,
capture_output=True,
)
for i in range(TIMEOUT_SECONDS):
try:
response = httpx.get(SENTRY_TEST_HOST, follow_redirects=True)
except httpx.RequestError:
time.sleep(1)
else:
if response.status_code == 200:
break
else:
raise AssertionError("timeout waiting for self-hosted to come up")

if request.config.getoption("--customizations") == "enabled":
os.environ["TEST_CUSTOMIZATIONS"] = "enabled"
script_content = """\
#!/bin/bash
touch /created-by-enhance-image
apt-get update
apt-get install -y gcc libsasl2-dev python-dev libldap2-dev libssl-dev
"""

with open("sentry/enhance-image.sh", "w") as script_file:
script_file.write(script_content)
# Set executable permissions for the shell script
os.chmod("sentry/enhance-image.sh", 0o755)

# Write content to the requirements.txt file
with open("sentry/requirements.txt", "w") as req_file:
req_file.write("python-ldap\n")
os.environ["MINIMIZE_DOWNTIME"] = "1"
subprocess.run(["./install.sh"], check=True)
# Create test user
subprocess.run(
[
"docker",
"compose",
"exec",
"-T",
"web",
"sentry",
"createuser",
"--force-update",
"--superuser",
"--email",
TEST_USER,
"--password",
TEST_PASS,
"--no-input",
],
check=True,
text=True,
)


@pytest.fixture()
def setup_backup_restore_env_variables():
os.environ["SENTRY_DOCKER_IO_DIR"] = os.path.join(os.getcwd(), "sentry")
os.environ["SKIP_USER_CREATION"] = "1"
45 changes: 0 additions & 45 deletions _integration-test/custom-ca-roots/setup.sh

This file was deleted.

3 changes: 0 additions & 3 deletions _integration-test/custom-ca-roots/teardown.sh

This file was deleted.

5 changes: 3 additions & 2 deletions _integration-test/custom-ca-roots/test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import unittest

import requests


class CustomCATests(unittest.TestCase):
def test_valid_self_signed(self):
self.assertEqual(requests.get("https://self.test").text, 'ok')
self.assertEqual(requests.get("https://self.test").text, "ok")

def test_invalid_self_signed(self):
with self.assertRaises(requests.exceptions.SSLError):
requests.get("https://fail.test")


if __name__ == '__main__':
if __name__ == "__main__":
unittest.main()
36 changes: 0 additions & 36 deletions _integration-test/ensure-backup-restore-works.sh

This file was deleted.

13 changes: 0 additions & 13 deletions _integration-test/ensure-customizations-not-present.sh

This file was deleted.

Loading

0 comments on commit c1f35ab

Please sign in to comment.