Skip to content

Commit c8ea42e

Browse files
authored
Merge pull request #1692 from forcedotcom/jj/W-17158924
FIX (CodeAnalyzer) @W-17311922@ Fix pager duty alert subject
2 parents 7be4f03 + b39f70a commit c8ea42e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

.github/workflows/production-heartbeat.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ jobs:
107107
if: ${{ failure() || cancelled() }}
108108
shell: bash
109109
env:
110-
# If we're here because steps failed or were skipped, then that's a critical problem. Otherwise it's a normal one.
111-
# We can't use the `failure()` or `cancelled()` convenience methods outside of the `if` condition, hence the
112-
# `contains()` calls.
113-
IS_CRITICAL: ${{ contains(join(steps.*.outcome), 'failure') || contains(join(steps.*.outcome), 'skipped') }}
114110
# Build the status strings for each step as environment variables to save space later. Null retry_count values
115111
# will be replaced with `n/a` to maintain readability in the alert.
116112
CLI_INSTALL_STATUS: ${{ steps.sf_install.outcome }} after ${{ steps.sf_install.outputs.retry_count || 'n/a' }} retries
@@ -120,13 +116,8 @@ jobs:
120116
RUN_LINK: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
121117
run: |
122118
# GHA env-vars don't have robust conditional logic, so we'll use this if-else branch to define some bash env-vars.
123-
if [[ ${{ env.IS_CRITICAL }} == true ]]; then
124-
ALERT_SEV="critical"
125-
ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}"
126-
else
127-
ALERT_SEV="info"
128-
ALERT_SUMMARY="Production heartbeat script succeeded with retries on ${{ runner.os }}"
129-
fi
119+
ALERT_SEV="critical"
120+
ALERT_SUMMARY="Production heartbeat script failed on ${{ runner.os }}"
130121
# Define a helper function to create our POST request's data, to sidestep issues with nested quotations.
131122
generate_post_data() {
132123
# This is known as a HereDoc, and it lets us declare multi-line input ending when the specified limit string,

0 commit comments

Comments
 (0)