Backport VAULT-41683: fix false postiive failure notification into ce/main (#11621)

Sometimes our CI slack message outputs the wrong information, most
notably the data race failure when only UI tests run but the UI tests
fail. In an effort to fix this false positive I noticed that there are
several error cases we didn't consider when creating the notification.
Now we only report which failures were detected in the message.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Ryan Cragun <me@ryan.ec>
This commit is contained in:
Vault Automation 2026-01-12 14:09:44 -08:00 committed by GitHub
parent 9abe521b19
commit 964ab5a9b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 10 deletions

View file

@ -593,11 +593,11 @@ jobs:
text:
type: mrkdwn
text: |
${{ needs.setup.result != 'failure' && ':white_check_mark:' || ':x:' }} Setup
${{ needs.ui.result != 'failure' && ':white_check_mark:' || ':x:' }} Build UI
${{ (needs.artifacts-ent.result != 'failure' && needs.artifacts-ce.result != 'failure') && ':white_check_mark:' || ':x:' }} Build Vault Artifacts
${{ needs.test.result != 'failure' && ':white_check_mark:' || ':x:' }} Enos package test scenarios
${{ needs.test-containers.result != 'failure' && ':white_check_mark:' || ':x:' }} Enos container test scenarios
${{ needs.setup.result == 'failure' && ':x: Setup' || '' }}
${{ needs.ui.result == 'failure' && ':x: Build UI' || '' }}
${{ needs.test.result == 'failure' && ':x: Enos package test scenarios' || '' }}
${{ needs.test-containers.result == 'failure' && ':x: Enos container test scenarios' || '' }}
${{ (needs.artifacts-ent.result == 'failure' || needs.artifacts-ce.result == 'failure') && ':x: Build Vault Artifacts' || '' }}
accessory:
type: button
text:

View file

@ -436,6 +436,8 @@ jobs:
always() &&
needs.setup.outputs.workflow-trigger == 'push' &&
(
needs.setup.result == 'failure' ||
needs.test-autopilot-upgrade.result == 'failure' ||
needs.test-go.result == 'failure' ||
needs.test-go-race.result == 'failure' ||
needs.test-go-race.outputs.data-race-result == 'failure' ||
@ -462,11 +464,18 @@ jobs:
text:
type: mrkdwn
text: |
${{ needs.test-go.result != 'failure' && ':white_check_mark:' || ':x:' }} Go tests
${{ needs.test-go-race.result != 'failure' && ':white_check_mark:' || ':x:' }} Go race tests
${{ needs.test-go-race.outputs.data-race-result != 'success' && ':x: Data race detected' || ':white_check_mark: No race detected' }}
${{ needs.test-go-testonly.result != 'failure' && ':white_check_mark:' || ':x:' }} Go testonly tests
${{ needs.test-ui.result != 'failure' && ':white_check_mark:' || ':x:' }} UI tests
${{ needs.setup.result == 'failure' && ':x: Setup' || '' }}
${{ needs.test-autopilot-upgrade.result == 'failure' && ':x: Autopilot upgrade' || '' }}
${{ needs.test-go.result == 'failure' && ':x: Go tests' || '' }}
${{ needs.test-go-testonly.result == 'failure' && ':x: Go testonly tests' || '' }}
${{ needs.test-go-fips.result == 'failure' && ':x: Go FIPS tests' || '' }}
${{ needs.test-ui.result == 'failure' && ':x: UI tests' || '' }}
${{ needs.test-go-race.result != 'skipped' &&
(
((needs.test-go-race.outputs.data-race-result != '' && needs.test-go-race.outputs.data-race-result != 'success') && ':x: Go race tests (Data race(s) detected)') ||
(needs.test-go-race.result == 'failure' && ':x: Go race tests' || '')
) || ''
}}
accessory:
type: button
text: