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

Default to not sending data to Sentry for now #1695

Merged
merged 3 commits into from
Sep 14, 2022
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
1 change: 0 additions & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ steps:
- "-c"
- |
git clone -b $BRANCH_NAME https://github.com/getsentry/self-hosted.git
echo 'no' > self-hosted/.reporterrors
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > self-hosted/docker-compose.override.yml
timeout: 60s
- name: "gcr.io/$PROJECT_ID/docker-compose"
Expand Down
7 changes: 7 additions & 0 deletions install/_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ umask 002
log_file="sentry_install_log-`date +'%Y-%m-%d_%H-%M-%S'`.txt"
exec &> >(tee -a "$log_file")

# Thanks to https://tldp.org/LDP/abs/html/intandnonint.html
if [[ "$(tty)" == "not a tty" ]]; then
PROMPTABLE=0
else
PROMPTABLE=1
fi

# Work from /install/ for install.sh, project root otherwise
if [[ "$(basename $0)" = "install.sh" ]]; then
cd "$(dirname $0)/install/"
Expand Down
104 changes: 70 additions & 34 deletions install/error-handling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,42 +22,78 @@ if [[ -f $reporterrors ]]; then
export REPORT_ERRORS=0
fi
else
echo
echo "Hey, so ... we would love to find out when you hit an issue with this here"
echo "installer you are running. Turns out there is an app for that, called Sentry."
echo "Are you okay with us sending info to Sentry when you run this installer?"
echo
echo " y / yes / 1"
echo " n / no / 0"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect in order to help us improve the installer:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo
if [[ $PROMPTABLE == "0" ]]; then
echo
echo "Hey, so ... we would love to find out when you hit an issue with this here"
echo "installer you are running. Turns out there is an app for that, called Sentry."
echo "Would you be willing to let us automatically send data to Sentry from this "
echo "installer? If so, add this to your automation:"
echo
echo " echo yes > /path/to/sentry/.reporterrors"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect in order to help us improve the installer:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo
echo "For now we are defaulting to not sending data, but our plan is to hard-require"
echo "a choice from you starting in version 22.10.0, because let's be honest, none of"
echo "you will act on this otherwise. To avoid disruption you can use one of these"
echo "flags:"
echo
echo " echo no > /path/to/sentry/.reporterrors"
echo
echo "We'll probably also add an env var and/or CLI flag before then, too. See:"
echo
echo " https://github.com/getsentry/team-ospo/issues/36"
echo
echo "Thanks for using Sentry."
echo
else
echo
echo "Hey, so ... we would love to find out when you hit an issue with this here"
echo "installer you are running. Turns out there is an app for that, called Sentry."
echo "Are you okay with us sending info to Sentry when you run this installer?"
echo
echo " y / yes / 1"
echo " n / no / 0"
echo
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
echo "so that we can be in this together.)"
echo
echo "Here's the info we may collect in order to help us improve the installer:"
echo
echo " - OS username"
echo " - IP address"
echo " - install log"
echo " - performance data"
echo
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
echo

yn=""
until [ ! -z "$yn" ]
do
read -p "y or n? " yn
case $yn in
y | yes | 1) export REPORT_ERRORS=1; echo "yes" > $reporterrors; echo; echo -n "Thank you.";;
n | no | 0) export REPORT_ERRORS=0; echo "no" > $reporterrors; echo; echo -n "Understood.";;
*) yn="";;
esac
done
yn=""
until [ ! -z "$yn" ]
do
read -p "y or n? " yn
case $yn in
y | yes | 1) export REPORT_ERRORS=1; echo "yes" > $reporterrors; echo; echo -n "Thank you.";;
n | no | 0) export REPORT_ERRORS=0; echo "no" > $reporterrors; echo; echo -n "Understood.";;
*) yn="";;
esac
done

echo " Your answer is cached in '.reporterrors', remove it to see this"
echo "prompt again."
echo
sleep 5
echo " Your answer is cached in '.reporterrors', remove it to see this"
echo "prompt again."
echo
sleep 5
fi
fi

# Make sure we can use sentry-cli if we need it.
Expand Down
1 change: 0 additions & 1 deletion integration-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set -ex
echo "Reset customizations"
rm -f sentry/enhance-image.sh
rm -f sentry/requirements.txt
echo no > .reporterrors

echo "Testing initial install"
./install.sh
Expand Down