Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Early exit the loki stress test when every changed story is loki-skipped (#80790)

Fraserdd1cc22c220d
diff --git a/.github/workflows/loki-stress-test-flake-fix.yml b/.github/workflows/loki-stress-test-flake-fix.yml
index c949cb31514..f18d5545ef2 100644
--- a/.github/workflows/loki-stress-test-flake-fix.yml
+++ b/.github/workflows/loki-stress-test-flake-fix.yml
@@ -156,6 +156,9 @@ jobs:
- name: Stress-test Loki
run: |
+ # Loki's output is piped through tee below, and a pipeline normally reports the exit status of its last command.
+ # Without this a failed loki run would look like a pass, because tee itself succeeded.
+ set -o pipefail
BURN_IN=${{ inputs.burn_in || '10' }}
STORY_FILES='${{ needs.detect-changed-stories.outputs.story_files }}'
@@ -171,8 +174,11 @@ jobs:
if bun run test-visual:loki \
--reactUri file:./storybook-static \
- --verboseRenderer; then
+ --verboseRenderer 2>&1 | tee .loki-run.log; then
echo "✅ Run $i passed"
+ elif grep -q 'No stories were found' .loki-run.log; then
+ echo "::notice::Every story in the changed files is loki-skipped, nothing to stress test"
+ exit 0
else
echo "❌ Run $i FAILED"
FAILED=$((FAILED + 1))