Skip to content

feat: interactive ColdFront walkthrough (4 demos + Codespaces)#38

Draft
AntTheLimey wants to merge 42 commits into
mainfrom
feat/walkthrough
Draft

feat: interactive ColdFront walkthrough (4 demos + Codespaces)#38
AntTheLimey wants to merge 42 commits into
mainfrom
feat/walkthrough

Conversation

@AntTheLimey

Copy link
Copy Markdown
Member

What this adds

An interactive, self-contained ColdFront walkthrough — a guided demo that
doubles as a manual test harness — plus its user docs and a Codespaces
devcontainer.

  • examples/walkthrough/guide.sh (+ runner.sh): interactive guide with four demos
    • Tiered — relocate cold partitions to Iceberg/S3; same table, still writeable
    • Decoupled — a lake-native (Iceberg-only) table fronted by a Postgres view
    • Partitioner — automated PG range-partition maintenance, no cold tier
    • Distributed — a 2-node Spock mesh over one shared lake: cross-node
      visibility + concurrent cold-write serialization (the R-A bakery), no 409s
  • examples/walkthrough/docker-compose.mesh.yml — on-demand 2-node mesh stack for
    the Distributed demo (single↔mesh stack switch; a laptop can't hold both)
  • docs/walkthrough.md — the published, copy-pasteable version of the guide
  • .devcontainer/walkthrough/ — Codespaces path (auto-launches the guide)

Merges current main, which the Distributed demo relies on — notably
#36 (node-local advisory lock; makes multi-writer-per-node cold writes
conflict-free), plus #31 (lakekeeper healthcheck) and #34.

Testing

Local, on this machine (all green): host preflights (gofmt, go vet,
golangci-lint, unit tests, build, compactor module), mkdocs build --strict,
shellcheck -x on the guide, and a real demo_distributed NONINTERACTIVE
smoke
— 5 concurrent cold writers per node across both nodes, 10/10 landed,
0 conflicts, receipts ledger showing both nodes issuing/acking.

The ci/matrix.sh integration cell can't run on Docker Desktop for Mac
(the harness reaches Lakekeeper/SeaweedFS by container IP, which the Mac host
can't route to), so integration is left to GitHub Actions here. A separate
follow-up will make run-ci-local.sh work on macOS (publish LK/SW host ports +
curl localhost).

Notes

  • Draft — opening for early review and to exercise the Codespaces walkthrough
    against the branch.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b5f41838-9161-46c2-bdf0-2964b117d957

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR introduces an interactive ColdFront walkthrough: a devcontainer configuration and post-create provisioning script, a new CI workflow (ci-walkthrough.yml) with validate and smoke-test jobs, a comprehensive docs/walkthrough.md covering four demos (tiered storage, Iceberg-only, standalone partitioner, distributed mesh), and a developer reference examples/walkthrough/README.md.

Changes

ColdFront Walkthrough Onboarding

Layer / File(s) Summary
Devcontainer bootstrap
.devcontainer/devcontainer.json, .devcontainer/post-create.sh
Defines the walkthrough dev environment, extensions, and commands, and provisions dependencies plus runs setup on container creation.
CI validation and smoke test
.github/workflows/ci-walkthrough.yml
Adds triggers/concurrency, a ShellCheck/compose-validation job, and a smoke job that runs the guide, asserts DB tiering state, and tears down the stack.
Walkthrough guide intro and setup
docs/walkthrough.md
Documents prerequisites, stack startup, Lakekeeper bootstrap, and object-store substitution.
Demo 1: tiered storage
docs/walkthrough.md
Documents the eleven-step tiered storage demo: table setup, extensions, archiver policy, cold-tier proof, cross-tier queries, and update durability.
Demos 2-4: Iceberg-only, partitioner, distributed mesh
docs/walkthrough.md
Documents transparent Iceberg DML, standalone partition reconciliation, and a two-node Spock mesh with claim-ledger verification, plus next-steps links.
Walkthrough developer README
examples/walkthrough/README.md
Documents entrypoints, scripts, environment variables, compose services, and run instructions for curl, Codespaces, and cloned-repo paths.

Poem

A rabbit hops through docker lanes so bright,
Hot data, cold data, tiered just right 🥕
Four demos deep, from Iceberg to mesh,
CI checks the smoke, keeping things fresh.
Devcontainer humming, README in tow —
Hop in, dear dev, and watch ColdFront grow! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the interactive ColdFront walkthrough, its four demos, and Codespaces support.
Description check ✅ Passed The description accurately covers the walkthrough, docs, and devcontainer changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/walkthrough

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.

@codacy-production

codacy-production Bot commented Jul 2, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (4)
docs/walkthrough.md (1)

32-39: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Prerequisites list omits jq.

examples/walkthrough/setup.sh's REQUIRED_CMDS includes docker curl jq psql (plus ss/lsof), but the docs list only mentions curl, bash, and psql. Readers following the docs without running the one-liner may hit an avoidable missing-dependency error.

📝 Proposed fix
-- `curl`, `bash`, and `psql` on the host (the psql commands connect to
-  the published port).
+- `curl`, `bash`, `jq`, and `psql` on the host (the psql commands connect
+  to the published port).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/walkthrough.md` around lines 32 - 39, The prerequisites section is
missing jq, which is required by examples/walkthrough/setup.sh via
REQUIRED_CMDS. Update the walkthrough prerequisites list to include jq alongside
curl, bash, and psql, and keep the wording aligned with the setup.sh dependency
check so readers don’t miss the needed host tools.
.github/workflows/ci-walkthrough.yml (3)

54-63: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Exited-container check is a no-op — docker compose ps hides exited containers by default.

Per Docker's docs, docker compose ps "By default, only running containers are shown"; --all is required to include stopped/exited ones. As written, grep -E "Exit|exited" will never match anything, since exited containers are already filtered out — this step can never catch a service that crashed and will always report "All services are running."

Note: if you add --all, ensure the filter also excludes services that intentionally complete and exit (e.g., lakekeeper-migrate, a one-shot migration container per docker-compose.yml), to avoid a new false-positive.

🔧 Proposed fix
-          docker compose -f examples/walkthrough/docker-compose.yml ps
-          if docker compose -f examples/walkthrough/docker-compose.yml ps | grep -E "Exit|exited"; then
+          docker compose -f examples/walkthrough/docker-compose.yml ps --all
+          if docker compose -f examples/walkthrough/docker-compose.yml ps --all --status=exited \
+               --filter "name=events" | grep -vE "lakekeeper-migrate" | grep -qE "Exit|exited"; then
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-walkthrough.yml around lines 54 - 63, The
exited-container check in the CI walkthrough is ineffective because `docker
compose ps` only shows running containers by default, so the `grep` in the
service-status step can never detect crashed services. Update the check in the
workflow step that uses `docker compose -f
examples/walkthrough/docker-compose.yml ps` to include exited containers, and
then refine the filter so intentionally one-shot services like
`lakekeeper-migrate` are excluded from failure detection. Keep the existing
`docker compose ... logs` and failure path, but make the status check reliable
for actual crashes.

13-23: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Validate examples/walkthrough/docker-compose.mesh.yml too. The Validate Docker Compose step only checks examples/walkthrough/docker-compose.yml, so the distributed demo compose file can drift without CI catching it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-walkthrough.yml around lines 13 - 23, The Validate
Docker Compose step only checks the main walkthrough compose file, so update the
workflow’s validate job to also run docker compose config for
examples/walkthrough/docker-compose.mesh.yml. Use the existing Validate Docker
Compose step in ci-walkthrough and extend it so both compose files are validated
in CI, preventing the mesh demo config from drifting unnoticed.

1-12: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add packages: read to the walkthrough job
.github/workflows/ci-walkthrough.yml:24-36 needs explicit package scope for the GHCR login step; add permissions: packages: read so the base-image pull keeps working under restricted default token settings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci-walkthrough.yml around lines 1 - 12, The walkthrough
workflow is missing explicit package read permissions, which can break the GHCR
base-image pull under restricted token defaults. Update the ci-walkthrough
workflow by adding a permissions block with packages: read for the walkthrough
job so the GHCR login step continues to work; use the existing workflow/job
definition in ci-walkthrough.yml to place the change alongside the job
configuration.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.devcontainer/post-create.sh:
- Around line 6-16: The provisioning script is missing the Linux networking
dependency needed by the walkthrough prereq check. Update the post-create flow
in the .devcontainer/post-create.sh script where it installs packages and runs
examples/walkthrough/setup.sh to also install iproute2 alongside
postgresql-client and jq, matching the dependency expected by setup.sh and the
CI walkthrough setup.

---

Outside diff comments:
In @.github/workflows/ci-walkthrough.yml:
- Around line 54-63: The exited-container check in the CI walkthrough is
ineffective because `docker compose ps` only shows running containers by
default, so the `grep` in the service-status step can never detect crashed
services. Update the check in the workflow step that uses `docker compose -f
examples/walkthrough/docker-compose.yml ps` to include exited containers, and
then refine the filter so intentionally one-shot services like
`lakekeeper-migrate` are excluded from failure detection. Keep the existing
`docker compose ... logs` and failure path, but make the status check reliable
for actual crashes.
- Around line 13-23: The Validate Docker Compose step only checks the main
walkthrough compose file, so update the workflow’s validate job to also run
docker compose config for examples/walkthrough/docker-compose.mesh.yml. Use the
existing Validate Docker Compose step in ci-walkthrough and extend it so both
compose files are validated in CI, preventing the mesh demo config from drifting
unnoticed.
- Around line 1-12: The walkthrough workflow is missing explicit package read
permissions, which can break the GHCR base-image pull under restricted token
defaults. Update the ci-walkthrough workflow by adding a permissions block with
packages: read for the walkthrough job so the GHCR login step continues to work;
use the existing workflow/job definition in ci-walkthrough.yml to place the
change alongside the job configuration.

In `@docs/walkthrough.md`:
- Around line 32-39: The prerequisites section is missing jq, which is required
by examples/walkthrough/setup.sh via REQUIRED_CMDS. Update the walkthrough
prerequisites list to include jq alongside curl, bash, and psql, and keep the
wording aligned with the setup.sh dependency check so readers don’t miss the
needed host tools.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2aec7f1c-f59a-4fc9-aa1c-0c070d453e71

📥 Commits

Reviewing files that changed from the base of the PR and between 320271f and 1ef4e60.

📒 Files selected for processing (5)
  • .devcontainer/devcontainer.json
  • .devcontainer/post-create.sh
  • .github/workflows/ci-walkthrough.yml
  • docs/walkthrough.md
  • examples/walkthrough/README.md
✅ Files skipped from review due to trivial changes (1)
  • examples/walkthrough/README.md

Comment on lines +6 to +16
# Install PostgreSQL client and jq
echo "Installing jq and the PostgreSQL client..."
sudo apt-get update -qq
sudo apt-get install -y -qq postgresql-client jq

# Run the prerequisites check
# Note: If the published base image is awkward to pull in CI/Codespaces,
# set COLDFRONT_BASE to build the base locally:
# export COLDFRONT_BASE=local && bash examples/walkthrough/setup.sh
echo ""
bash examples/walkthrough/setup.sh

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Missing iproute2 package — setup.sh will fail its prerequisites check.

examples/walkthrough/setup.sh requires ss (from iproute2) on Linux hosts, and the CI workflow (ci-walkthrough.yml) explicitly installs iproute2 for this same check. This script only installs postgresql-client and jq, so if the Codespaces base image doesn't already ship iproute2, the prerequisites check will fail during provisioning.

🔧 Proposed fix
 echo "Installing jq and the PostgreSQL client..."
 sudo apt-get update -qq
-sudo apt-get install -y -qq postgresql-client jq
+sudo apt-get install -y -qq postgresql-client jq iproute2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Install PostgreSQL client and jq
echo "Installing jq and the PostgreSQL client..."
sudo apt-get update -qq
sudo apt-get install -y -qq postgresql-client jq
# Run the prerequisites check
# Note: If the published base image is awkward to pull in CI/Codespaces,
# set COLDFRONT_BASE to build the base locally:
# export COLDFRONT_BASE=local && bash examples/walkthrough/setup.sh
echo ""
bash examples/walkthrough/setup.sh
# Install PostgreSQL client and jq
echo "Installing jq and the PostgreSQL client..."
sudo apt-get update -qq
sudo apt-get install -y -qq postgresql-client jq iproute2
# Run the prerequisites check
# Note: If the published base image is awkward to pull in CI/Codespaces,
# set COLDFRONT_BASE to build the base locally:
# export COLDFRONT_BASE=local && bash examples/walkthrough/setup.sh
echo ""
bash examples/walkthrough/setup.sh
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.devcontainer/post-create.sh around lines 6 - 16, The provisioning script is
missing the Linux networking dependency needed by the walkthrough prereq check.
Update the post-create flow in the .devcontainer/post-create.sh script where it
installs packages and runs examples/walkthrough/setup.sh to also install
iproute2 alongside postgresql-client and jq, matching the dependency expected by
setup.sh and the CI walkthrough setup.

@vyruss

vyruss commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Pushed fixes to the branch (90a7fa0):

  • Tiered demo imports into partition_config before the archiver (post-refactor: make register the configuration path for managed tables #39 the YAML isn't read → would fatal). Verified.
  • NONINTERACTIVE failures now propagate, so a broken demo fails CI.
  • Mesh compose added to install.sh; --no-deps + Demo 4 SQL fixed in docs; CI exited-check needed ps -a.

These are based on current main — merge it into the branch to pick up #39 (removes the old fallback).

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