Skip to content

SLOP-237: preserve job exit status in generated cron entries - #15

Open
tosfos wants to merge 1 commit into
masterfrom
SLOP-237-preserve-cron-exit-status
Open

tosfos wants to merge 1 commit into
masterfrom
SLOP-237-preserve-cron-exit-status

Conversation

@tosfos

@tosfos tosfos commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Generated cron entries piped job output through tee unconditionally, so the pipeline exit status came from tee: supercronic saw exit 0 even when the scheduled job failed (reproduced: inner sh -c 'false; exit 7' reported as 0).
  • The entry now runs under bash -c 'set -o pipefail; ... | tee ...' (bash ships in this image), preserving the job's exit status while keeping the per-run log file behavior identical.
  • Verified with a stubbed docker exec + supercronic-faithful harness: failing job -> supercronic sees 7; passing job -> 0; both still logged.

Jira: SLOP-237

Test plan

  • shellcheck -x --shell=sh update_cron.sh clean
  • bash -n update_cron.sh clean
  • Entry passes supercronic -test
  • Hermetic repro: failing job now surfaces its exit code; successful job unaffected; logs still written

The generated entries piped through 'tee' unconditionally, so the
pipeline exit status came from tee and supercronic always saw success
even when the scheduled job failed. Wrap the pipeline in bash -c with
'set -o pipefail' (bash ships in this image) so failures propagate to
supercronic while output still lands in the per-run log file.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ad7cb1d8-cd74-4aa0-9c34-c3e314385dc5


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🐳 The image based on 808b6d34 commit has been built with 20260822-15 tag as ghcr.io/wikiteq/cron:20260822-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant