Skip to content
This repository was archived by the owner on Oct 13, 2026. It is now read-only.

Check the rest of what the labs need: push auth, Python, Docker memory, ports, all images - #2

Merged
sdonche merged 2 commits into
mainfrom
claude/more-preflight-checks
Sep 18, 2026
Merged

sdonche merged 2 commits into
mainfrom
claude/more-preflight-checks

Conversation

@sdonche

@sdonche sdonche commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Why

After the corporate-CA check (#1), a pass over what the lab repos actually require turned up several things a student can't discover until a lab is already underway — two of them classroom-wide rather than one-laptop problems (Docker Hub's per-IP pull limit behind the classroom NAT; the workflow token scope Lab 03 needs).

What's added

Check Tier Why
git commit identity Required Lab 01 starts with a commit
python3 ≥ 3.10 that can create a venv with pip Required Lab 02–07 scripts hard-exit without it; Lab 03 installs ign-lint (needs 3.10+) into a venv. Ubuntu/WSL ships python3 without python3-venv; macOS system Python is 3.9 — so the check creates a real venv
Memory available to Docker ≥ 8 GB Recommended Labs 04–06 run three 1 GB gateways + TimescaleDB + runner; Docker Desktop's VM allocation is independent of host RAM
Logged in to Docker Hub Recommended anonymous pulls are rate-limited per IP; the room shares one
gh token has repo + workflow Required Lab 03 pushes .github/workflows/*.yml; GitHub rejects that without workflow
git push can authenticate (gh helper or SSH) Required gh auth login ≠ git being able to push
No local Ignition install Recommended its service takes 8088 at boot
Lab ports 8088–8090, 8060–8062, 5432 free Required bound through Docker's real publish path (catches Windows-side listeners on WSL2); the report names the owning container/process
Pull every laptop-side image Required ignition:8.3.6, timescaledb:latest-pg16, github-runner — the multi-GB download happens a week early, not over classroom Wi-Fi

README table and troubleshooting.md updated with a section per new message.

Verified

  • bash -n + shellcheck clean.
  • Full run on macOS/OrbStack: every new check runs; it correctly flagged the system Python 3.9.6 and the lab containers I had running on 8088/8089/8060/8061/5432 (named per container).
  • Failure paths exercised with stubs: missing identity (GIT_CONFIG_GLOBAL=/dev/null), a fake gh returning a token without workflow, and a failing ssh for the git-auth branch.
  • Image pulls for all three images pass on arm64.

🤖 Generated with Claude Code

sdonche and others added 2 commits September 18, 2026 17:09
…r memory, ports, all images

Grounded in what the lab repos actually require:

- git commit identity (user.name/user.email): Lab 01 starts with a commit.
- python3 >= 3.10 that can create a venv with pip: lab scripts hard-exit
  without python3 and Lab 03 installs ign-lint/yamllint into a venv; on
  Ubuntu/WSL the venv module is a separate package, and macOS's system
  python is 3.9, so we actually create a venv rather than trust
  `command -v`.
- Memory available to Docker >= 8 GB (recommended): labs 04-06 run three
  1 GB gateways + TimescaleDB + the runner, and Docker Desktop's VM
  allocation is independent of host RAM.
- Docker Hub login (recommended): anonymous pulls are rate-limited per
  IP and the classroom shares one.
- gh token scopes include repo and workflow: Lab 03 pushes workflow
  files, which GitHub rejects without `workflow`.
- git push can authenticate: gh credential helper or a working SSH key;
  gh being logged in says nothing about plain `git push`.
- Local Ignition install (recommended): its service takes 8088 at boot.
- Lab ports 8088-8090, 8060-8062, 5432 are free, tested by binding them
  through Docker's real publish path so Windows-side listeners count
  too; the report names the owning container or process.
- Pull every laptop-side course image (ignition, timescaledb,
  github-runner), not just the smoke-test image, so the multi-GB
  download happens a week early and not over classroom Wi-Fi.

README table and troubleshooting sections updated for each new message.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Recognise gh's credential helper where `gh auth setup-git` actually
  puts it (credential "https://github.com"), not only credential.helper;
  the recommended fix was being reported as a failure.
- A passphrase-protected SSH key with no agent fails BatchMode ssh but
  works at the prompt: warn instead of failing when a key file exists.
- Only report a local Ignition install when the path has gateway
  markers (data/ignition.conf or lib/core/gateway), so a folder that
  merely happens to be called ~/ignition doesn't trigger it.
- Docker Hub login: also ask the configured credential helper, since
  signing in through Docker Desktop's UI may leave config.json without
  an auths entry.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sdonche
sdonche merged commit ad8fc89 into main Sep 18, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant