Skip to content

Add START_TIMEOUT#688

Merged
Minituff merged 1 commit into
mainfrom
start-timeout
May 25, 2026
Merged

Add START_TIMEOUT#688
Minituff merged 1 commit into
mainfrom
start-timeout

Conversation

@Minituff

Copy link
Copy Markdown
Owner

Summary

  • Fixes misleading ERROR log when a container with a restart policy takes a moment to reach running state after backup — downgraded to WARN since the backup completes successfully
  • Adds INFO: Container X is now running. confirmation log when a container eventually stabilizes after retries
  • Adds configurable START_TIMEOUT environment variable (default: 10 seconds) controlling how long Nautical waits for a container to reach running state, checking every 2 seconds
  • Adds per-container nautical-backup.start-timeout label to override START_TIMEOUT for individual containers

Before / After

Before (v2.20.0):

INFO: Starting scrutiny...
ERROR: Container scrutiny was not in running state. Trying again (Attempt 1/3)
WARN: Container scrutiny is in 'restarting' state, waiting for it to stabilize (Attempt 2/3)
WARN: Container scrutiny is in 'restarting' state, waiting for it to stabilize (Attempt 3/3)
INFO: Backup of scrutiny complete!

After:

INFO: Starting scrutiny...
WARN: Container scrutiny was not in running state. Trying again (Attempt 1/5)
WARN: Container scrutiny is in 'restarting' state, waiting for it to stabilize (Attempt 2/5)
WARN: Container scrutiny is in 'restarting' state, waiting for it to stabilize (Attempt 3/5)
INFO: Container scrutiny is now running.
INFO: Backup of scrutiny complete!

New options

Option Default Description
START_TIMEOUT=10 10s Global startup wait. Nautical checks every 2s, giving up after this many seconds.
nautical-backup.start-timeout=10 inherits START_TIMEOUT Per-container override.

Test plan

  • Existing start-container tests pass unchanged
  • New test: 3 consecutive restarting states before running (reproduces issue Container running state error. #683)
  • New test: start-timeout label overrides global START_TIMEOUT env var

@codecov

codecov Bot commented May 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.01%. Comparing base (8b25fda) to head (31a592f).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #688      +/-   ##
==========================================
+ Coverage   91.96%   92.01%   +0.05%     
==========================================
  Files           9        9              
  Lines        1107     1114       +7     
==========================================
+ Hits         1018     1025       +7     
  Misses         89       89              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Minituff Minituff merged commit f3a3bde into main May 25, 2026
5 checks passed
@Minituff Minituff deleted the start-timeout branch May 25, 2026 18:36
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