Skip to content

Commit 2ef54aa

Browse files
authored
Default to not sending data to Sentry for now (#1695)
1 parent 31767d2 commit 2ef54aa

File tree

4 files changed

+77
-36
lines changed

4 files changed

+77
-36
lines changed

cloudbuild.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ steps:
77
- "-c"
88
- |
99
git clone -b $BRANCH_NAME https://github.com/getsentry/self-hosted.git
10-
echo 'no' > self-hosted/.reporterrors
1110
echo '{"version": "3.4", "networks":{"default":{"external":{"name":"cloudbuild"}}}}' > self-hosted/docker-compose.override.yml
1211
timeout: 60s
1312
- name: "gcr.io/$PROJECT_ID/docker-compose"

install/_lib.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ umask 002
88
log_file="sentry_install_log-`date +'%Y-%m-%d_%H-%M-%S'`.txt"
99
exec &> >(tee -a "$log_file")
1010

11+
# Thanks to https://tldp.org/LDP/abs/html/intandnonint.html
12+
if [[ "$(tty)" == "not a tty" ]]; then
13+
PROMPTABLE=0
14+
else
15+
PROMPTABLE=1
16+
fi
17+
1118
# Work from /install/ for install.sh, project root otherwise
1219
if [[ "$(basename $0)" = "install.sh" ]]; then
1320
cd "$(dirname $0)/install/"

install/error-handling.sh

Lines changed: 70 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -22,42 +22,78 @@ if [[ -f $reporterrors ]]; then
2222
export REPORT_ERRORS=0
2323
fi
2424
else
25-
echo
26-
echo "Hey, so ... we would love to find out when you hit an issue with this here"
27-
echo "installer you are running. Turns out there is an app for that, called Sentry."
28-
echo "Are you okay with us sending info to Sentry when you run this installer?"
29-
echo
30-
echo " y / yes / 1"
31-
echo " n / no / 0"
32-
echo
33-
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
34-
echo "so that we can be in this together.)"
35-
echo
36-
echo "Here's the info we may collect in order to help us improve the installer:"
37-
echo
38-
echo " - OS username"
39-
echo " - IP address"
40-
echo " - install log"
41-
echo " - performance data"
42-
echo
43-
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
44-
echo
25+
if [[ $PROMPTABLE == "0" ]]; then
26+
echo
27+
echo "Hey, so ... we would love to find out when you hit an issue with this here"
28+
echo "installer you are running. Turns out there is an app for that, called Sentry."
29+
echo "Would you be willing to let us automatically send data to Sentry from this "
30+
echo "installer? If so, add this to your automation:"
31+
echo
32+
echo " echo yes > /path/to/sentry/.reporterrors"
33+
echo
34+
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
35+
echo "so that we can be in this together.)"
36+
echo
37+
echo "Here's the info we may collect in order to help us improve the installer:"
38+
echo
39+
echo " - OS username"
40+
echo " - IP address"
41+
echo " - install log"
42+
echo " - performance data"
43+
echo
44+
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
45+
echo
46+
echo "For now we are defaulting to not sending data, but our plan is to hard-require"
47+
echo "a choice from you starting in version 22.10.0, because let's be honest, none of"
48+
echo "you will act on this otherwise. To avoid disruption you can use one of these"
49+
echo "flags:"
50+
echo
51+
echo " echo no > /path/to/sentry/.reporterrors"
52+
echo
53+
echo "We'll probably also add an env var and/or CLI flag before then, too. See:"
54+
echo
55+
echo " https://github.com/getsentry/team-ospo/issues/36"
56+
echo
57+
echo "Thanks for using Sentry."
58+
echo
59+
else
60+
echo
61+
echo "Hey, so ... we would love to find out when you hit an issue with this here"
62+
echo "installer you are running. Turns out there is an app for that, called Sentry."
63+
echo "Are you okay with us sending info to Sentry when you run this installer?"
64+
echo
65+
echo " y / yes / 1"
66+
echo " n / no / 0"
67+
echo
68+
echo "(Btw, we send this to our own self-hosted Sentry instance, not to Sentry SaaS,"
69+
echo "so that we can be in this together.)"
70+
echo
71+
echo "Here's the info we may collect in order to help us improve the installer:"
72+
echo
73+
echo " - OS username"
74+
echo " - IP address"
75+
echo " - install log"
76+
echo " - performance data"
77+
echo
78+
echo "Thirty (30) day retention. No marketing. Privacy policy at sentry.io/privacy."
79+
echo
4580

46-
yn=""
47-
until [ ! -z "$yn" ]
48-
do
49-
read -p "y or n? " yn
50-
case $yn in
51-
y | yes | 1) export REPORT_ERRORS=1; echo "yes" > $reporterrors; echo; echo -n "Thank you.";;
52-
n | no | 0) export REPORT_ERRORS=0; echo "no" > $reporterrors; echo; echo -n "Understood.";;
53-
*) yn="";;
54-
esac
55-
done
81+
yn=""
82+
until [ ! -z "$yn" ]
83+
do
84+
read -p "y or n? " yn
85+
case $yn in
86+
y | yes | 1) export REPORT_ERRORS=1; echo "yes" > $reporterrors; echo; echo -n "Thank you.";;
87+
n | no | 0) export REPORT_ERRORS=0; echo "no" > $reporterrors; echo; echo -n "Understood.";;
88+
*) yn="";;
89+
esac
90+
done
5691

57-
echo " Your answer is cached in '.reporterrors', remove it to see this"
58-
echo "prompt again."
59-
echo
60-
sleep 5
92+
echo " Your answer is cached in '.reporterrors', remove it to see this"
93+
echo "prompt again."
94+
echo
95+
sleep 5
96+
fi
6197
fi
6298

6399
# Make sure we can use sentry-cli if we need it.

integration-test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ set -ex
44
echo "Reset customizations"
55
rm -f sentry/enhance-image.sh
66
rm -f sentry/requirements.txt
7-
echo no > .reporterrors
87

98
echo "Testing initial install"
109
./install.sh

0 commit comments

Comments
 (0)