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

pull changes from origin #3

Merged
merged 16 commits into from
Nov 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Question about self-hosting/on-premise
url: https://forum.sentry.io
about: Please use the community forums for questions
- name: Report a security vulnerability
url: https://sentry.io/security/#vulnerability-disclosure
about: Please see our guide for responsible disclosure.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ body:
- type: markdown
attributes:
value: |-
## Thanks 🙏
## Thanks
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
validations:
required: false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 🐞 Bug Report
description: Tell us about something that's not working the way we (probably) intend.
name: 🐞 Problem Report
description: Tell us about something that's not working the way you expect.
body:
- type: input
id: version
Expand Down Expand Up @@ -40,7 +40,7 @@ body:
- type: markdown
attributes:
value: |-
## Thanks 🙏
## Thanks
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next.
validations:
required: false
28 changes: 19 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,27 @@ jobs:
integration-test:
runs-on: ubuntu-20.04
name: "integration test"
strategy:
fail-fast: false
matrix:
include:
- compose_version: '1.28.0'
compose_path: '/usr/local/bin'
- compose_version: 'v2.0.1'
compose_path: '/usr/local/lib/docker/cli-plugins'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Pin docker-compose

- name: Get Compose
run: |
COMPOSE_PATH=/usr/local/bin/docker-compose
source ./install/_min-requirements.sh
sudo rm $COMPOSE_PATH
sudo curl -L https://github.com/docker/compose/releases/download/${MIN_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o $COMPOSE_PATH
sudo chmod +x $COMPOSE_PATH
# 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"
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: Integration Test
run: |
Expand All @@ -52,5 +62,5 @@ jobs:
- name: Inspect failure
if: failure()
run: |
docker-compose ps
docker-compose logs
docker compose ps
docker compose logs
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 21.11.0

### Various fixes & improvements

- Fix #1079 - bug in reset.sh (#1134) by @chadwhitacre
- ci: Enable parallel tests again, increase timeouts (#1125) by @BYK
- fix: Hide compose errors during version check (#1124) by @BYK
- build: Omit nightly bump commit from changelog (#1120) by @BYK
- build: Set master version to nightly (d3e77857)

## 21.10.0

### Support for Docker Compose v2 (ongoing)

You asked for it and you did it! Sentry self-hosted now can work with Docker Compose v2 thanks to our community's contributions.

PRs: #1116

### Various fixes & improvements

- docs: simplify Linux `sudo` instructions in README (#1096)
- build: Set master version to nightly (58874cf9)

## 21.9.0

- fix(healthcheck): Increase retries to 5 (#1072)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Additional Use Grant: You may make use of the Licensed Work, provided that you d
error-reporting or application monitoring features of the
Licensed Work.

Change Date: 2024-09-15
Change Date: 2024-11-16

Change License: Apache License, Version 2.0

Expand Down
8 changes: 4 additions & 4 deletions _integration-test/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -e
set -ex

source "$(dirname $0)/../install/_lib.sh"

Expand Down Expand Up @@ -41,7 +41,7 @@ echo "${_group}Starting Sentry for tests ..."
echo 'SENTRY_BEACON=False' >> $SENTRY_CONFIG_PY
$dcr web createuser --superuser --email $TEST_USER --password $TEST_PASS || true
$dc up -d
printf "Waiting for Sentry to be up"; timeout 60 bash -c 'until $(curl -Isf -o /dev/null $SENTRY_TEST_HOST); do printf '.'; sleep 0.5; done'
printf "Waiting for Sentry to be up"; timeout 90 bash -c 'until $(curl -Isf -o /dev/null $SENTRY_TEST_HOST); do printf '.'; sleep 0.5; done'
echo ""
echo "${_endgroup}"

Expand Down Expand Up @@ -99,7 +99,7 @@ EVENT_PATH="projects/sentry/internal/events/$TEST_EVENT_ID/"
export -f sentry_api_request get_csrf_token
export SENTRY_TEST_HOST COOKIE_FILE EVENT_PATH
printf "Getting the test event back"
timeout 30 bash -c 'until $(sentry_api_request "$EVENT_PATH" -Isf -X GET -o /dev/null); do printf '.'; sleep 0.5; done'
timeout 60 bash -c 'until $(sentry_api_request "$EVENT_PATH" -Isf -X GET -o /dev/null); do printf '.'; sleep 0.5; done'
echo " got it!";

EVENT_RESPONSE=$(sentry_api_request "$EVENT_PATH")
Expand All @@ -118,7 +118,7 @@ done
echo "${_endgroup}"

echo "${_group}Ensure cleanup crons are working ..."
$dc ps | grep -q -- "-cleanup_.\+[[:space:]]\+Up[[:space:]]\+"
$dc ps | grep -q -E -e '\-cleanup\s+running\s+' -e '\-cleanup[_-].+\s+Up\s+'
echo "${_endgroup}"

echo "${_group}Test custom CAs work ..."
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ services:
smtp:
<<: *restart_policy
image: tianon/exim4
hostname: ${SENTRY_MAIL_HOST:-}
hostname: ${SENTRY_MAIL_HOST:-''}
volumes:
- "sentry-smtp:/var/spool/exim4"
- "sentry-smtp-log:/var/log/exim4"
Expand Down Expand Up @@ -328,7 +328,7 @@ services:
<<: *restart_policy
ports:
- "$SENTRY_BIND:80/tcp"
image: "nginx:1.21.0-alpine"
image: "nginx:1.21.4-alpine"
volumes:
- type: bind
read_only: true
Expand Down
3 changes: 2 additions & 1 deletion install/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ else
_endgroup=""
fi

dc="docker-compose --ansi never"
dc_base="$(docker compose version &> /dev/null && echo 'docker compose' || echo 'docker-compose')"
dc="$dc_base --ansi never"
dcr="$dc run --rm"

# A couple of the config files are referenced from other subscripts, so they
Expand Down
9 changes: 7 additions & 2 deletions install/check-minimum-requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@ echo "${_group}Checking minimum requirements ..."
source "$(dirname $0)/_min-requirements.sh"

DOCKER_VERSION=$(docker version --format '{{.Server.Version}}')
# Do NOT use $dc instead of `docker-compose` below as older versions don't support certain options and fail
COMPOSE_VERSION=$(docker-compose --version | sed 's/docker-compose version \(.\{1,\}\),.*/\1/')
# Get semantic version of Docker Compose v2
if docker compose version &>/dev/null; then
COMPOSE_VERSION=$(docker compose version --short | sed 's/v\{0,1\}\(.\{1,\}\)/\1/')
else
# Do NOT use $dc instead of `docker-compose` below as older versions don't support certain options and fail
COMPOSE_VERSION=$(docker-compose --version | sed 's/docker-compose version \(.\{1,\}\),.*/\1/')
fi
RAM_AVAILABLE_IN_DOCKER=$(docker run --rm busybox free -m 2>/dev/null | awk '/Mem/ {print $2}');
CPU_AVAILABLE_IN_DOCKER=$(docker run --rm busybox nproc --all);

Expand Down
3 changes: 2 additions & 1 deletion install/wrap-up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ if [[ "$MINIMIZE_DOWNTIME" ]]; then

# Start the whole setup, except nginx and relay.
$dc up -d --remove-orphans $($dc config --services | grep -v -E '^(nginx|relay)$')
$dc restart relay
$dc exec -T nginx nginx -s reload

docker run --rm --network="${COMPOSE_PROJECT_NAME}_default" alpine ash \
Expand All @@ -18,7 +19,7 @@ else
echo ""
echo "You're all done! Run the following command to get Sentry running:"
echo ""
echo " docker-compose up -d"
echo " $dc_base up -d"
echo ""
echo "-----------------------------------------------------------------"
echo ""
Expand Down
2 changes: 1 addition & 1 deletion reset.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ if [ -n "$version" ]; then
fi

# Install.
exec ./install.sh
./install.sh
2 changes: 1 addition & 1 deletion scripts/post-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ cd $SCRIPT_DIR/..
# Bring master back to nightlies after merge from release branch
git checkout master && git pull
SYMBOLICATOR_VERSION=nightly ./scripts/bump-version.sh '' 'nightly'
git diff --quiet || git commit -anm 'build: Set master version to nightly' && git pull --rebase && git push
git diff --quiet || git commit -anm $'build: Set master version to nightly\n\n#skip-changelog' && git pull --rebase && git push