You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Highlights
Eleven new labs. A Terraform track of five, the first Python lab and the first AI lab, plus stashing, reusable workflows, incident triage and merge conflicts. Nine of them were written by the community: see the credits below.
The AI line starts, with no GPU and no key.Your first agent loop teaches what a language model, a tool call and an agent loop are by building one against a scripted stand-in model that runs on your machine, and says plainly what a stand-in can and cannot teach.
Python is now in the image (standard library only, about 55 MB, budget 540 MB), so labs can teach scripting.
A hardening pass from a whole-repo review. One odd request could stop the server, a stalled browser tab could exhaust its memory, another page on localhost could open a shell, a crafted lab link could run script, and the AWS learner role could be used to gain account admin. All fixed; see Fixed and the Upgrade notes.
Commands you complete with Tab or recall with the arrow keys now count in tasks that check what you ran.
Added
AI agents: your first agent loop (a new AI-agents track, and the first AI lab): learn what a language model, a tool call and an agent loop are by building one in Python against a scripted stand-in model that runs on your machine, so it needs no GPU, network or key. The lab says plainly what a stand-in can and cannot teach.
Terraform learning track: a new hands-on track of five labs (Your First Terraform Project, Providers and Resources, Variables, Outputs and References, State and Remote Backends, and the integrated Terraform in Action practice lab), teaching declarative HCL syntax, provider configuration, resource definitions, input variables, outputs, resource references, state inspection, and native S3 remote locking. Contributed by Prakhar Srivastava, @Heyyprakhar1, #71.
Git and GitHub: stashing uncommitted work (git stash, git stash list, git stash pop): save in-progress changes, ship a hotfix on main, then restore them. Contributed by Sanket Dangat, @srdangat, #69.
GitHub Actions: multi-environment CI/CD with reusable workflows (workflow_call inputs and secrets, calling a workflow with uses: and with:, staging to production with needs:). Contributed by Sanket Dangat, @srdangat, #70.
Linux Fundamentals: production incident triage: find and stop a runaway process, truncate a runaway log without breaking its open file, lock down a world-writable credentials file, then start the service. Contributed by Preetham Pereira, @cloudwithpreetham, #67.
Git and GitHub: resolving merge conflicts (read conflict markers, resolve app.conf, stage it, complete the merge): the conflict a teammate's branch leaves behind, fixed by hand. Contributed by Rakesh Patra, @Rakesh-Patra, #68.
Python for DevOps: automating with Python (the first lab of a new Python track; the topic goes live on the AI line): read a log and count by level, summarise it as JSON, take a command-line argument, and archive big files with gzip. Every script is graded by running it against a log it has not seen.
Fixed
A command you completed with Tab or recalled with the arrow keys now counts. Tasks that check which command you ran missed commands built that way (cat docs/rea + Tab was logged as cat docs/rea). The shell now reports each command exactly as it ran it.
AWS labs: Check no longer fails silently on a slow connection. Account-lab checks get 30 seconds instead of 5, and a check that does run out of time now says so instead of showing an empty message.
AWS labs: the cleanup check needs a real cleanup. It passed when the bucket had never existed (for example after skipping ahead). It now also requires that you deleted it, and says so if AWS cannot confirm either way (a permissions problem is no longer read as "gone").
scripts/aws-lab-sweep.sh no longer reports a clean account when an AWS call failed. A failed listing now stops it with the reason.
scripts/aws-lab-creds.sh --duration matches the learner role. The role issues sessions of up to 4 hours; the script and docs allowed 12 and then failed with a misleading message.
AWS=1 ./start_local_labs.sh works with the legacy docker-compose (the image pre-build skipped the compose fallback).
The AWS learner role could be used to gain account admin.deploy/learner-role.yaml let it create roles and policies under /tws-labs/ with any content, then assume them. No lab needs this, so those permissions are gone (it keeps read-only IAM). Update the CloudFormation stack to apply it; see Upgrade notes.
A crafted lab link could run script on the completion screen. The finish page built resource links without escaping them. They are escaped now, and a link containing a quote, angle bracket or space is refused when the lab is loaded.
Links with underscores or stars in the URL rendered wrongly.[docs](https://example.com/_static_/a.html) had its URL turned into emphasis markup; the URL is now kept as written.
One odd request could stop the whole server. A request target such as // made the handler throw and the process exit, ending every learner's session. Any target now gets an answer.
A stalled browser tab could exhaust the server's memory. Output from a command like yes piled up without limit while the tab was not reading (about 50 MB a second in a test). The server now stops reading the terminal until the browser catches up, as a real terminal does.
Another page on localhost could open a shell. The local app accepted a request from any loopback port; it now requires its own origin, port included. A native npm start in the local profile also now listens on 127.0.0.1 only (set HOST to change it); Docker is unchanged.
Changed
Python 3 is now in the lab image (Debian's python3, about 55 MB, standard library only: no pip), so labs can teach scripting for operations. The image budget in image-size-budget.json rises from 520 MB to 540 MB for it (the CI image is 520 MB with it; about 20 MB of headroom is kept on purpose). PYTHONDONTWRITEBYTECODE is set so learners' folders do not fill with __pycache__.
Upgrade notes
Self-hosters: git pull && ./start_local_labs.sh rebuilds the image once (about 55 MB larger). Nothing in deploy/ changes.
Using the AWS labs? Update your tws-labs-learner CloudFormation stack with the new deploy/learner-role.yaml (Update stack -> Replace current template): the role loses its IAM write permissions. Existing stacks keep the old, broader role until you do.
Running the local profile natively (LAB_PROFILE=local npm start)? It now binds 127.0.0.1; set HOST=0.0.0.0 if you really want other machines to reach it (a shell is on offer, so rarely).