From 8714b413839512d6171d6358eadb328fce8d8ecd Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 10 Jun 2025 18:30:15 -0500 Subject: [PATCH 1/5] chore: format for better editing --- salt/base/scripts/sentry-checkin.sh.jinja | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/salt/base/scripts/sentry-checkin.sh.jinja b/salt/base/scripts/sentry-checkin.sh.jinja index 220b011d..d62aa851 100644 --- a/salt/base/scripts/sentry-checkin.sh.jinja +++ b/salt/base/scripts/sentry-checkin.sh.jinja @@ -9,8 +9,19 @@ MONITOR_SLUG="salt-highstate-${MINION_ID//./}" if [ -n "$SENTRY_INGEST_URL" ] && [ -n "$SENTRY_PROJECT_ID" ] && [ -n "$SENTRY_PROJECT_KEY" ]; then curl -X POST "https://${SENTRY_INGEST_URL}/api/${SENTRY_PROJECT_ID}/cron/${MONITOR_SLUG}/${SENTRY_PROJECT_KEY}/" \ - --header 'Content-Type: application/json' \ - --data-raw '{"monitor_config": {"schedule": {"type": "crontab", "value": "*/15 * * * *"}, "checkin_margin": 5, "max_runtime": 30, "timezone": "UTC"}, "status": "in_progress"}' &> /dev/null + --header 'Content-Type: application/json' \ + --data-raw '{ + "monitor_config": { + "schedule": { + "type": "crontab", + "value": "*/15 * * * *" + }, + "checkin_margin": 5, + "max_runtime": 30, + "timezone": "UTC", + }, + "status": "in_progress" + }' &> /dev/null "$@" COMMAND_EXIT=$? From 23741e48c07874affde6c292c35874d6a8e1b65e Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 10 Jun 2025 18:30:23 -0500 Subject: [PATCH 2/5] chore: format for better editing --- salt/base/scripts/sentry-checkin.sh.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/base/scripts/sentry-checkin.sh.jinja b/salt/base/scripts/sentry-checkin.sh.jinja index d62aa851..04360445 100644 --- a/salt/base/scripts/sentry-checkin.sh.jinja +++ b/salt/base/scripts/sentry-checkin.sh.jinja @@ -19,6 +19,7 @@ if [ -n "$SENTRY_INGEST_URL" ] && [ -n "$SENTRY_PROJECT_ID" ] && [ -n "$SENTRY_P "checkin_margin": 5, "max_runtime": 30, "timezone": "UTC", + }, "status": "in_progress" }' &> /dev/null From 421f4b8edbeb6cbed76c7013db7d011ecab11ab5 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 10 Jun 2025 18:30:39 -0500 Subject: [PATCH 3/5] feat: recover after 1, issue only after 4 --- salt/base/scripts/sentry-checkin.sh.jinja | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/base/scripts/sentry-checkin.sh.jinja b/salt/base/scripts/sentry-checkin.sh.jinja index 04360445..80cfd70a 100644 --- a/salt/base/scripts/sentry-checkin.sh.jinja +++ b/salt/base/scripts/sentry-checkin.sh.jinja @@ -19,7 +19,8 @@ if [ -n "$SENTRY_INGEST_URL" ] && [ -n "$SENTRY_PROJECT_ID" ] && [ -n "$SENTRY_P "checkin_margin": 5, "max_runtime": 30, "timezone": "UTC", - + "failure_issue_threshold": 4, + "recovery_threshold": 1 }, "status": "in_progress" }' &> /dev/null From 1c419ee24f48f9585881babe7c21d41ae89984bd Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 10 Jun 2025 18:31:56 -0500 Subject: [PATCH 4/5] chore: fmt --- salt/base/scripts/sentry-checkin.sh.jinja | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/salt/base/scripts/sentry-checkin.sh.jinja b/salt/base/scripts/sentry-checkin.sh.jinja index 80cfd70a..7d0c8e45 100644 --- a/salt/base/scripts/sentry-checkin.sh.jinja +++ b/salt/base/scripts/sentry-checkin.sh.jinja @@ -9,21 +9,21 @@ MONITOR_SLUG="salt-highstate-${MINION_ID//./}" if [ -n "$SENTRY_INGEST_URL" ] && [ -n "$SENTRY_PROJECT_ID" ] && [ -n "$SENTRY_PROJECT_KEY" ]; then curl -X POST "https://${SENTRY_INGEST_URL}/api/${SENTRY_PROJECT_ID}/cron/${MONITOR_SLUG}/${SENTRY_PROJECT_KEY}/" \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "monitor_config": { - "schedule": { - "type": "crontab", - "value": "*/15 * * * *" + --header 'Content-Type: application/json' \ + --data-raw '{ + "monitor_config": { + "schedule": { + "type": "crontab", + "value": "*/15 * * * *" + }, + "checkin_margin": 5, + "max_runtime": 30, + "timezone": "UTC", + "failure_issue_threshold": 4, + "recovery_threshold": 1 }, - "checkin_margin": 5, - "max_runtime": 30, - "timezone": "UTC", - "failure_issue_threshold": 4, - "recovery_threshold": 1 - }, - "status": "in_progress" - }' &> /dev/null + "status": "in_progress" + }' &> /dev/null "$@" COMMAND_EXIT=$? From 54d1e82d3f3c1f48427a6f8940624f43eca5375c Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 10 Jun 2025 18:32:20 -0500 Subject: [PATCH 5/5] chore: fmt --- salt/base/scripts/sentry-checkin.sh.jinja | 28 +++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/salt/base/scripts/sentry-checkin.sh.jinja b/salt/base/scripts/sentry-checkin.sh.jinja index 7d0c8e45..5434b654 100644 --- a/salt/base/scripts/sentry-checkin.sh.jinja +++ b/salt/base/scripts/sentry-checkin.sh.jinja @@ -9,21 +9,21 @@ MONITOR_SLUG="salt-highstate-${MINION_ID//./}" if [ -n "$SENTRY_INGEST_URL" ] && [ -n "$SENTRY_PROJECT_ID" ] && [ -n "$SENTRY_PROJECT_KEY" ]; then curl -X POST "https://${SENTRY_INGEST_URL}/api/${SENTRY_PROJECT_ID}/cron/${MONITOR_SLUG}/${SENTRY_PROJECT_KEY}/" \ - --header 'Content-Type: application/json' \ - --data-raw '{ - "monitor_config": { - "schedule": { - "type": "crontab", - "value": "*/15 * * * *" + --header 'Content-Type: application/json' \ + --data-raw '{ + "monitor_config": { + "schedule": { + "type": "crontab", + "value": "*/15 * * * *" + }, + "checkin_margin": 5, + "max_runtime": 30, + "timezone": "UTC", + "failure_issue_threshold": 4, + "recovery_threshold": 1 }, - "checkin_margin": 5, - "max_runtime": 30, - "timezone": "UTC", - "failure_issue_threshold": 4, - "recovery_threshold": 1 - }, - "status": "in_progress" - }' &> /dev/null + "status": "in_progress" + }' &> /dev/null "$@" COMMAND_EXIT=$?