Skip to content

Commit ff3142c

Browse files
authored
Merge pull request #1004 from replicatedhq/divolgin/metrics
keep going if metrics cannot be reported
2 parents d43fccc + 34f1d3d commit ff3142c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/common/reporting.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function report_install_start() {
2020

2121
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
2222
-d "{\"started\": \"$started\", \"os\": \"$LSB_DIST $DIST_VERSION\", \"kernel_version\": \"$KERNEL_MAJOR.$KERNEL_MINOR\", \"kurl_url\": \"$KURL_URL\", \"installer_id\": \"$INSTALLER_ID\", \"testgrid_id\": \"$TESTGRID_ID\"}" \
23-
$REPLICATED_APP_URL/kurl_metrics/start_install/$INSTALLATION_ID
23+
$REPLICATED_APP_URL/kurl_metrics/start_install/$INSTALLATION_ID || true
2424
}
2525

2626
function report_install_success() {
@@ -35,7 +35,7 @@ function report_install_success() {
3535

3636
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
3737
-d "{\"finished\": \"$completed\"}" \
38-
$REPLICATED_APP_URL/kurl_metrics/finish_install/$INSTALLATION_ID
38+
$REPLICATED_APP_URL/kurl_metrics/finish_install/$INSTALLATION_ID || true
3939
}
4040

4141
function report_install_fail() {
@@ -51,7 +51,7 @@ function report_install_fail() {
5151

5252
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
5353
-d "{\"finished\": \"$completed\", \"cause\": \"$cause\"}" \
54-
$REPLICATED_APP_URL/kurl_metrics/fail_install/$INSTALLATION_ID
54+
$REPLICATED_APP_URL/kurl_metrics/fail_install/$INSTALLATION_ID || true
5555
}
5656

5757
function report_addon_start() {
@@ -68,7 +68,7 @@ function report_addon_start() {
6868

6969
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
7070
-d "{\"started\": \"$started\", \"addon_version\": \"$version\", \"testgrid_id\": \"$TESTGRID_ID\"}" \
71-
$REPLICATED_APP_URL/kurl_metrics/start_addon/$INSTALLATION_ID/$name
71+
$REPLICATED_APP_URL/kurl_metrics/start_addon/$INSTALLATION_ID/$name || true
7272
}
7373

7474
function report_addon_success() {
@@ -85,7 +85,7 @@ function report_addon_success() {
8585

8686
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
8787
-d "{\"finished\": \"$completed\"}" \
88-
$REPLICATED_APP_URL/kurl_metrics/finish_addon/$INSTALLATION_ID/$name
88+
$REPLICATED_APP_URL/kurl_metrics/finish_addon/$INSTALLATION_ID/$name || true
8989
}
9090

9191
function k8s_ctrl_c() {
@@ -122,7 +122,7 @@ function addon_install_fail() {
122122

123123
curl -s --output /dev/null -H 'Content-Type: application/json' --max-time 5 \
124124
-d "{\"finished\": \"$completed\"}" \
125-
$REPLICATED_APP_URL/kurl_metrics/fail_addon/$INSTALLATION_ID/$name
125+
$REPLICATED_APP_URL/kurl_metrics/fail_addon/$INSTALLATION_ID/$name || true
126126

127127
# provide an option for a user to provide a support bundle
128128
printf "${YELLOW}Addon ${name} ${version} failed to install${NC}\n"

0 commit comments

Comments
 (0)