Skip to content

Wait for osprey-worker before Demo Ready - #466

Merged
cassidyjames merged 3 commits into
roostorg:mainfrom
forest-savage1234:wait-osprey-worker-before-demo-ready
Aug 25, 2026
Merged

cassidyjames merged 3 commits into
roostorg:mainfrom
forest-savage1234:wait-osprey-worker-before-demo-ready

Conversation

@forest-savage1234

@forest-savage1234 forest-savage1234 commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Wait for osprey-worker before Demo Ready

Closes #433.

Description

demo.sh prints Demo Ready without waiting for osprey-worker. The script waits for kafka, postgres, minio, Druid, the UI API, and the UI, then prints the banner. If the worker dies on first boot (#432), newcomers still see Demo Ready and an empty UI. This adds wait_for_container "osprey-worker" 90 with the other waits. Compose container_name is osprey-worker (no healthcheck; the helper falls back to Running).

Checklist

  • Tests pass locally
  • uv run ruff check . passes (no unused imports or other lint errors)
  • uv tool run fawltydeps --check-unused --pyenv .venv passes (no unused dependencies)
  • Updated CHANGELOG.md with my changes, if notable (refer to Keep a Changelog conventions)

demo.sh was run. The Tests box stays unchecked because Demo Ready was not reached. The worker wait failed (exit 1). That is the intended gate, not a full green demo.

Validation

$ uv run ruff check .
All checks passed!

Exit 0.

$ uv tool run fawltydeps --check-unused --pyenv .venv

No unused dependencies detected.

Exit 0.

./demo.sh run 2026-08-23 ~7:06–7:35 PM AKDT on Windows. Shallow clone of main at C:\\Users\\fores\\Downloads\\osprey-433-demo. Docker already running. One-line dest wait only. No Demo Ready. Exit 1.

========================================
       Osprey Demo Setup Script
========================================
Checking prerequisites...
✓ Docker found
✓ Docker Compose found
✓ Docker daemon is running
Checking for existing Osprey services...
✓ No conflicting services found
✓ Running from Osprey repository
Step 1: Cleaning up existing services and volumes...
✓ Cleanup complete (volumes removed for fresh start)
Checking required ports...
✓ All required ports are available
Step 2: Pulling Docker images (this may take a few minutes on first run)...
✓ Images pulled
Step 3: Starting core services (building images if needed)...
✓ Core services starting
Step 4: Waiting for services to be ready...
Waiting for osprey-kafka...
✓ osprey-kafka is ready
Waiting for postgres...
✓ postgres is ready
Waiting for minio...
✓ minio is ready
Waiting for Druid Broker...
✓ Druid Broker is ready
Waiting for Osprey UI API...
✓ Osprey UI API is ready
Waiting for Osprey UI...
✓ Osprey UI is ready
Waiting for osprey-worker...
✗ osprey-worker failed to start

git diff --stat on demo.sh: 1 file changed, 1 insertion(+) (wait_for_container "osprey-worker" 90 || exit 1). Worker start failure is #432, out of scope.

Files

  1. demo.sh
  2. CHANGELOG.md

Out of scope

How to review

A dead worker should fail the wait instead of printing Demo Ready.

I am a volunteer. Thank you for the time. I am trying to become more useful on this work, so I welcome a critical look. If this is the wrong cut, or you want me to stand down, say so and I will recut from notes.

Summary by CodeRabbit

  • Bug Fixes

    • The demo now waits for the worker service to become healthy before opening the interface.
    • If the worker stops unexpectedly, the demo reports the failure instead of opening an empty interface.
  • Documentation

    • Added an unreleased changelog entry describing the improved demo startup behavior.

demo.sh printed Demo Ready without waiting for the worker.
Add wait_for_container osprey-worker 90 after the UI wait.
Compose container_name is osprey-worker (no healthcheck;
the helper falls back to Running).

Closes roostorg#433.

Signed-off-by: Forest Savage <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 24, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

Next included review available in 14 minutes.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 39436df1-29c9-48f4-88ae-fc9954cc01a6

📥 Commits

Reviewing files that changed from the base of the PR and between 9251a15 and 133b4fd.

📒 Files selected for processing (1)
  • demo.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f3c7c67-e2bf-442e-8c26-9aeed2b58c36

📥 Commits

Reviewing files that changed from the base of the PR and between 5944e75 and 9251a15.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • demo.sh

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The demo script now checks osprey-worker health before declaring the demo ready. It fails when the worker does not become ready within 90 attempts. The changelog documents this behavior.

Changes

Demo worker readiness

Layer / File(s) Summary
Worker health wait and documentation
demo.sh, CHANGELOG.md
The script waits for osprey-worker before reporting readiness and fails after 90 unsuccessful attempts. The changelog records the new behavior.

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: 🔵 Low · up to 9251a

The change prevents Demo Ready from appearing when osprey-worker fails to start. The bounded behavior change is otherwise localized, but explicit human approval is still required before merging the startup-script update.

Suggested reviewers: ayubun

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: waiting for osprey-worker before declaring the demo ready.
Linked Issues check ✅ Passed The change adds the required osprey-worker readiness check before the Demo Ready banner, satisfying issue #433.
Out of Scope Changes check ✅ Passed The changes are limited to the required demo readiness check and its changelog entry.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@forest-savage1234

Copy link
Copy Markdown
Contributor Author

Thank you for the time on this review. The dest is only the osprey-worker wait before Demo Ready. If that is the wrong cut, say so and I will recut from notes.

@cassidyjames

Copy link
Copy Markdown
Member

@forest-savage1234 thanks for the contribution! I'm testing this locally (I haven't actually tested demo.sh recently…), but it looks simple enough at a glance. I don't think we need to update the changelog here, though; it's a minor fix of a race condition and not something most people will encounter or notice.

`docker inspect --format='{{.State.Health.Status}}'` writes a stray newline to stdout before failing when a container has no healthcheck, breaking the "not_found" fallback even when the container is healthy.

Use a Go template conditional instead of catching the error, so a missing healthcheck falls back correctly instead of erroring.
@cassidyjames
cassidyjames requested a review from a team as a code owner August 25, 2026 22:27

@cassidyjames cassidyjames left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @forest-savage1234! I made one minor fix (the not_found fallback was broken), but otherwise this should be good.

@cassidyjames
cassidyjames enabled auto-merge (squash) August 25, 2026 22:31
@cassidyjames
cassidyjames merged commit a1ff45c into roostorg:main Aug 25, 2026
6 checks passed
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.

demo.sh declares Demo Ready without checking the worker

2 participants