Repository navigation
Conversation
Add a devcontainer that runs the full demo stack with synthetic data in GitHub Codespaces (or any devcontainer tool) with no commands to type: Docker-in-Docker on a 4-core / 16 GB machine, images pulled and built in updateContentCommand (prebuild-friendly), the stack started and checked in postStartCommand on every start or resume, and status shown on attach. - The UI dev server proxies /api to the UI API, and the devcontainer's compose override points the UI at /api, so the browser only talks to the forwarded UI port. Codespaces forwards each port as its own login-protected origin, so localhost:5004 can't work there. - The test-data producer now exits when its Kafka producer dies, so its restart policy retries. Before, a Docker restart that started it before Kafka left it printing "Sending" forever with no events flowing. - Docs: a step-by-step Codespaces guide for non-engineers, an "Open in GitHub Codespaces" badge in the README, and AGENTS.md run instructions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. Comment |
Covers the docker-in-docker feature in .devcontainer/devcontainer.json, with the same weekly schedule, cooldown and labels as the other ecosystems. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a devcontainer so anyone, including non-engineers, can click Open in GitHub Codespaces, wait a few minutes, and get the Osprey UI in their browser with demo data flowing, without typing any commands.
It requires a 4-core/16GB host, which is $0.36/hour.
Right now it takes a few (~3-5) minutes to spin up, but I've enabled a daily 'prebuild' in our codespaces, so it should be super fast next time!
This required a small change to osprey_ui to proxy '/api'. Previously we hardcoded
REACT_APP_API_BASE_URL=http://localhost:5004, which doesn't behind Codespace forwarding. We know have an optional override (OSPREY_UI_API_PROXY_TARGET, defaulthttp://localhost:5004).This PR also fixes a bug in the test-data producer where it would never recover after a Docker restart. Happy to spin that out to a separate PR if desired.
Adds documentation for developing on codespaces, and an 'Open in Github Codespaces' badge in the README.
Testing
Built and ran the devcontainer with
@devcontainers/cli@0.80.2(up) in a Coder workspace (8 cores, 51 GB, Docker 29.9). I didn't create a real Codespace.The workspace's network and CPUs are fast, so expect a cold start without a prebuild to take several times longer in a real codespace.
demo-codespace-5002.app.github.devhost to mimic the forwarded origin. It checked that no request leaves that origin (0 did) and that no request fails (0 did). It covered Submit Query, the event stream, the See Details popup, theRegexMatch(target=PostText, pattern="hello")query, the banner's pre-filled link (Top N byUserId), the user labels panel (meow), Rules Visualizer, Rules, Saved Queries and the UDF registry.pre-commit run --all-filespasses, excepteslint-osprey-ui, which can't run here withoutosprey_ui/node_modules(CI skips that hook too).pnpm run lint(0 errors),typecheckandbuildpass, run inside the UI container.Locally (not on Codespaces), the Docker-in-Docker feature's dockerd failed on this workspace's Linux 7.0 kernel (
can't initialize iptables table 'nat': no legacy iptables). I switched the devcontainer toiptables-nftfor testing. The guide's "For engineers" section mentions it.Needs a real Codespace to confirm
*.app.github.devforwarding itself: private-port auth,openBrowserOncewith a port published by docker-proxy, HMR websocket through the proxy./var/lib/dockervolume), so a prebuilt codespace skipsprepare.sh's pulls.prepare.shsigns in ifDOCKERHUB_USERNAME/DOCKERHUB_TOKENCodespaces secrets exist, and says what to do if a pull is rate-limited.Recommended repository settings (not changed)
Settings → Codespaces → Set up prebuild:
main, configuration.devcontainer/devcontainer.json.uv.lock/pnpm-lock.yamlchanges should land in prebuilds promptly, use Scheduled, daily instead.Org Codespaces policies, if roostorg pays for members' codespaces: allow the 4-core machine type, set a spending limit, and consider a max idle timeout around 60 minutes for demos.
Approval items
New third-party images and features (dependencies). ✅ Approved by mark on 2026-10-30:
mcr.microsoft.com/devcontainers/base:ubuntu-24.04ghcr.io/devcontainers/features/docker-in-docker:2I used
@devcontainers/cliand the Playwright image only for testing; neither is added to the repo.Dependabot didn't cover these:
.github/dependabot.ymlonly listeduvandgithub-actions. ✅ With mark's approval, this PR adds adevcontainersentry (weekly, 7-day cooldown,dependencies/dependabotlabels, like the other ecosystems), so feature bumps such asdocker-in-dockerarrive on their own. It's appended at the end of the file and merges cleanly with the open #552 and #570. Thedevcontainersecosystem only updates features; themcr.microsoft.com/devcontainers/base:ubuntu-24.04image tag isn't something it bumps, but that tag is a rolling Ubuntu 24.04 tag, so it picks up rebuilt images on its own.Follow-ups (not in this PR)
ContainsHello == Truematches nothing: Druid 34's schema discovery stores booleans as0/1, and the query translator sends"value": true. Getting Started,demo.sh,concepts.mdandrules/examples.mdall suggest that query. fix(query): match boolean features the way Druid stores them #594 fixes it in the query translator; until it merges, the Codespaces guide usesRegexMatch(target=PostText, pattern="hello"), which works either way.start/endin the URL, but it shows "Last Day". Codespaces can only auto-open the port's root, so the guide says to click Submit Query, and the banner prints a pre-filled link. With an empty range,/events/topnreturns 400 and the client throwsCannot read properties of undefined (reading 'length').