Skip to content

[WIK-2504] Add timeout to e2e CI wait loop - #413

Open
tosfos wants to merge 2 commits into
masterfrom
WIK-2504
Open

[WIK-2504] Add timeout to e2e CI wait loop#413
tosfos wants to merge 2 commits into
masterfrom
WIK-2504

Conversation

@tosfos

@tosfos tosfos commented Aug 21, 2026

Copy link
Copy Markdown

Ticket: WIK-2504

Summary

The unbounded wait loop described in the ticket:

while ! docker compose logs web --tail 10 | grep -q '>>>>> run-maintenance-script.sh <<<<<'; do sleep 1; done

no longer exists verbatim on master: it was already refactored into .github/scripts/wait-for-wiki-init.sh (commit d2aa7af), which implements exactly the deadline-based bounded wait the ticket asks for — a wall-clock deadline, a log-follower liveness check, and fail-fast detection of fatal bootstrap errors. It is used by both the test and deploy-e2e jobs in .github/workflows/docker-image.yml.

However, its default timeout was still 600s (10 minutes), while the ticket asks for ~5 minutes. This PR changes the default:

-MAX_WAIT_SECONDS="${MAX_WAIT_SECONDS:-600}"
+MAX_WAIT_SECONDS="${MAX_WAIT_SECONDS:-300}"

The MAX_WAIT_SECONDS environment variable override is preserved, so callers can still tune or extend the wait without code changes.

Rationale

On init hangs, CI previously burned up to 10 minutes before failing; the ticket specifies ~5 minutes as a sensible bound. The script also prints the last 40 lines of streamed web logs on timeout, so failure diagnostics remain available well before any job-level GitHub Actions timeout would kill the run.

Test plan

  • bash -n .github/scripts/wait-for-wiki-init.sh passes
  • YAML parse check on .github/workflows/docker-image.yml (python3 -c "import yaml; yaml.safe_load(open(...))") passes
  • Standalone sanity test of the same deadline logic: exits after the configured budget when the marker never appears (~3s with a 3s budget) and detects the marker promptly when it appears mid-wait — bounded, not endless
  • Full e2e suite green on this PR's CI run (not run locally)

No other behavior is changed; unrelated code and the separate container-health wait loops are intentionally left untouched.

@coderabbitai

coderabbitai Bot commented Aug 21, 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: 413c32b1-c6a2-41ab-9f87-ad4adae11a74


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.

@tosfos

tosfos commented Aug 22, 2026

Copy link
Copy Markdown
Author

Review follow-up: deploy-e2e now explicitly sets MAX_WAIT_SECONDS=600 to preserve its init margin; the test job keeps the new 300s fail-fast default.

@github-actions

Copy link
Copy Markdown

🐳 The image based on f85965d2 commit has been built with 1.43.8-20260822-413 tag as ghcr.io/wikiteq/taqasta:1.43.8-20260822-413

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.

2 participants