You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if grep -q 'SENTRY_TSDB_OPTIONS = '"$SENTRY_CONFIG_PY";then
178
-
echo"Not attempting automatic TSDB migration due to presence of SENTRY_TSDB_OPTIONS"
179
-
else
180
-
echo"Attempting to automatically migrate to new TSDB"
181
-
# Escape newlines for sed
182
-
tsdb_settings="${tsdb_settings//$'\n'/\\n}"
183
-
cp "$SENTRY_CONFIG_PY""$SENTRY_CONFIG_PY.bak"
184
-
sed -i -e "s/^SENTRY_TSDB = .*$/${tsdb_settings}/g""$SENTRY_CONFIG_PY"||true
185
-
186
-
if grep -xq 'SENTRY_TSDB = "sentry.tsdb.redissnuba.RedisSnubaTSDB"'"$SENTRY_CONFIG_PY";then
187
-
echo"Migrated TSDB to Snuba. Old configuration file backed up to $SENTRY_CONFIG_PY.bak"
188
-
return
189
-
fi
190
-
191
-
echo"Failed to automatically migrate TSDB. Reverting..."
192
-
mv "$SENTRY_CONFIG_PY.bak""$SENTRY_CONFIG_PY"
193
-
echo"$SENTRY_CONFIG_PY restored from backup."
194
-
fi
195
-
196
-
echo"WARN: Your Sentry configuration uses a legacy data store for time-series data. Remove the options SENTRY_TSDB and SENTRY_TSDB_OPTIONS from $SENTRY_CONFIG_PY and add:"
197
-
echo""
198
-
echo"$tsdb_settings"
199
-
echo""
200
-
echo"For more information please refer to https://github.com/getsentry/onpremise/pull/430"
201
-
fi
202
-
}
203
-
204
-
replace_tsdb
205
-
echo"${_endgroup}"
206
-
207
-
echo"${_group}Fetching and updating Docker images ..."
208
-
# We tag locally built images with an '-onpremise-local' suffix. docker-compose pull tries to pull these too and
209
-
# shows a 404 error on the console which is confusing and unnecessary. To overcome this, we add the stderr>stdout
210
-
# redirection below and pass it through grep, ignoring all lines having this '-onpremise-local' suffix.
if grep -q 'SENTRY_TSDB_OPTIONS = '"$SENTRY_CONFIG_PY";then
18
+
echo"Not attempting automatic TSDB migration due to presence of SENTRY_TSDB_OPTIONS"
19
+
else
20
+
echo"Attempting to automatically migrate to new TSDB"
21
+
# Escape newlines for sed
22
+
tsdb_settings="${tsdb_settings//$'\n'/\\n}"
23
+
cp "$SENTRY_CONFIG_PY""$SENTRY_CONFIG_PY.bak"
24
+
sed -i -e "s/^SENTRY_TSDB = .*$/${tsdb_settings}/g""$SENTRY_CONFIG_PY"||true
25
+
26
+
if grep -xq 'SENTRY_TSDB = "sentry.tsdb.redissnuba.RedisSnubaTSDB"'"$SENTRY_CONFIG_PY";then
27
+
echo"Migrated TSDB to Snuba. Old configuration file backed up to $SENTRY_CONFIG_PY.bak"
28
+
return
29
+
fi
30
+
31
+
echo"Failed to automatically migrate TSDB. Reverting..."
32
+
mv "$SENTRY_CONFIG_PY.bak""$SENTRY_CONFIG_PY"
33
+
echo"$SENTRY_CONFIG_PY restored from backup."
34
+
fi
35
+
36
+
echo"WARN: Your Sentry configuration uses a legacy data store for time-series data. Remove the options SENTRY_TSDB and SENTRY_TSDB_OPTIONS from $SENTRY_CONFIG_PY and add:"
37
+
echo""
38
+
echo"$tsdb_settings"
39
+
echo""
40
+
echo"For more information please refer to https://github.com/getsentry/onpremise/pull/430"
0 commit comments