Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ spec:
)
attempts=10
for i in $(seq 1 "$attempts"); do
smoke; rc=$?
# Not `smoke; rc=$?`: orun runs a step under `bash -e`, so a bare failing
# call would end the step on attempt 1 and skip the whole retry budget.
rc=0; smoke || rc=$?
if [ "$rc" -eq 0 ]; then
[ "$i" -gt 1 ] && echo "smoke passed on attempt $i/$attempts"
exit 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ spec:
)
attempts=10
for i in $(seq 1 "$attempts"); do
smoke; rc=$?
# Not `smoke; rc=$?`: orun runs a step under `bash -e`, so a bare failing
# call would end the step on attempt 1 and skip the whole retry budget.
rc=0; smoke || rc=$?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve failures from multi-command smoke scripts

When a configured smokeCommand has multiple commands and relies on the step's bash -e (for example, a failed check followed by a successful logging command), calling smoke on the left of || makes Bash ignore errexit throughout the function's subshell. The later command can make the attempt return 0, so the loop reports a broken deployment as healthy instead of retrying or failing. Preserve errexit for the smoke body while capturing its status.

Useful? React with 👍 / 👎.

if [ "$rc" -eq 0 ]; then
[ "$i" -gt 1 ] && echo "smoke passed on attempt $i/$attempts"
exit 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ spec:
)
attempts=10
for i in $(seq 1 "$attempts"); do
smoke; rc=$?
# Not `smoke; rc=$?`: orun runs a step under `bash -e`, so a bare failing
# call would end the step on attempt 1 and skip the whole retry budget.
rc=0; smoke || rc=$?
if [ "$rc" -eq 0 ]; then
[ "$i" -gt 1 ] && echo "smoke passed on attempt $i/$attempts"
exit 0
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Stack
metadata:
name: stack-tectonic
title: Stack Tectonic
version: 0.19.1
version: 0.19.2
description: Versioned OCI-hosted catalog of Cloudflare, Terraform and monorepo compositions for Sourceplane repositories.
owner: sourceplane
tags:
Expand Down
Loading