Declare Studio's dev container for agent-containers
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 15/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- docker, docker-compose, github-actions, python
- Bereich
- devops, devtools, infrastructure
Rechercherichtung
Start with docker-compose.yml, docker/Dockerfile.dev, and docker/studio-dev/entrypoint.py, then read the linked agent-containers declaration and publish workflow docs. Trace the stated container, sidecar, GCS, and setup constraints before making changes. Done means the listed compose and agent-containers flows meet the acceptance criteria, including tests, uploads, publishing, uid ownership, and image publishing.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Agents running in a sandbox can't start containers, and rtibblesbot keeps its own copy of Studio's dev setup for QA. That copy drifts from Studio and breaks when a branch changes the setup, as #6450's GCS branch did on the copy's minio steps. Studio should declare its dev container so any agent can build, test, lint and serve Studio through agent-containers, a tool that starts the container from outside the sandbox. The same docker-compose.yml keeps serving engineers who run docker compose up.
Complexity: High
Target branch: unstable
Context
docker/Dockerfile.devruns only as root: Python in root-owned system site-packages,node_modulesin/src, and noENTRYPOINT(L1-57).agent-containersruns the container as the invoking user, mounts the worktree at the target'sworking_dir(else/workspace), and runs the image's entrypoint, never compose'sentrypoint:.docker/studio-dev/entrypoint.pywaits about 10s for postgres and storage, runsmanage.py setupon every start ignoring its exit code, and runs the command as a child, not viaexec(L20-105).- A sidecar gets only its image,
environment,command,healthcheckand named volumes. The tool waits for a sidecar only through its healthcheck, and none of Studio's services declares one. A target'sportscan forward a host port to a sidecar's port ("gcs:4443"). studio-nginxhasbuildbut noimage, which is an error (declaration.py L163-174), andcelery-workerwould pulllearningequality/studio-app-dev, which is not published.- Webpack's bind and public ports are already separate through
WEBPACK_DEV_PUBLIC_HOST/_PORT(webpackDevServerAddress.js L9-56). - Under #6450, the browser fetches files and uploads from the GCS emulator directly:
file_serverredirects to<request host>:<emulator port>, resumable upload URIs carry the emulator's-public-host, and the bucket is created by a composeentrypoint:. - Publishing a channel needs a running celery worker, or it sits at 0%.
makerunsgit rev-parse(Makefile L150), and the container mounts the git dir read-only.
The Change
studio-appindocker-compose.ymlshould declare anx-agentblock, as described in theagent-containersREADME:- commands for serving, testing (
make test,pnpm test) and linting; - PyPI, npm, and the GitHub hosts that git dependencies, node-sass's binary and the prek hook repos download from, as its allowed hosts;
- port 8080, port 4000 mapped to
WEBPACK_DEV_PUBLIC_PORT, and the GCS emulator's port 4443 forwarded from its sidecar asGCS_PUBLIC_PORT.
- commands for serving, testing (
- Every emulator URL the browser receives (
file_serverredirects and resumable upload session URIs) should namelocalhost:${GCS_PUBLIC_PORT}; the emulator itself builds them from theHostit was called on. serveshould run the dev server and a celery worker together. If either one exits,servestops.postgres,redisandgcsshould declare healthchecks, the GCS bucket should exist without compose'sentrypoint:, andstudio-nginxandcelery-workershould not break the declaration.- The dev image should run as any non-root uid. Its venv,
node_modules, and pnpm, corepack and prek homes should sit outside the worktree mount and be writable by that user. - The image should carry
prekwith Studio's hook environments installed. - The image's entrypoint should install a branch's requirements and lockfile changes, migrate on each start, run
setuponce per database, thenexecthe command.docker compose upandagent-containersthen share one setup path. - A workflow on
unstableshould publish the image throughagent-containers' reusable publish workflow (agent-containers initwrites it). AGENTS.mdshould direct agents to run Studio's commands throughagent-containers. A QA guide in the repo should give the login ([email protected]/aat/accounts/login/), the seeded channels, and what to check.
How to Get There
- Engineer flow: run
docker compose upin a Studio checkout. - Agent flow: run
agent-containers serveandagent-containers run -- make testfrom a Studio checkout. A sandboxed agent first needsagent-containers installrun once outside its sandbox, with the checkout under one of its roots.
Out of Scope
- rtibblesbot's switch to Studio's target and removal of its own Studio setup, tracked in coding-agent.
- Moving from minio to the GCS emulator: #6445.
- The rest of #6459's linting changes.
- Images for
hotfixesor PRs: onlyunstablepublishes. Dockerfile.prodand the production deploy.
Acceptance Criteria
Each from a fresh clone of unstable:
-
docker compose upserves Studio athttp://localhost:8080with its JS bundles loading, and[email protected]/asigns in at/accounts/login/. - The same holds for
agent-containers serveat the URL it prints. - Under both, a file uploaded to a channel finishes uploading, its preview loads, and publishing that channel reaches 100%.
-
make test,pnpm testand the lint command pass when run throughagent-containers run. - A file
agent-containers runwrites in the worktree is owned by you. - On a branch that adds a Python and an npm dependency, both import inside the container without a rebuilt image.
- A second start on the same database doesn't run
setupagain, and data from the first run is still there. - A push to
unstabletouching only source files publishes nothing. One touching a Dockerfile, a requirements file,pnpm-lock.yamlordocker-compose.ymlpublishesghcr.io/learningequality/studio/studio-app:default. - A fresh agent session given only the repo runs the tests through
agent-containers, followingAGENTS.md.
References
- learningequality/kolibri-data-portal#1247, the first repo declared: an entrypoint that drops to the checkout's owner, installs each branch's lockfile and runs first-run setup once, and caches shared with any uid.
- The
agent-containersREADME.
AI usage
I used Claude Code to design this with me and draft the issue. I chose GCS over minio, a forwarded emulator port over a Django proxy, prek as a separate step, and unstable alone. Claude Code read Studio's compose file, Dockerfile, entrypoint and settings, agent-containers' sidecar handling and rtibblesbot's Studio recipe, and drafted the sections.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 214
- Forks
- 327
- Ø Merge
- 17 Std. 5 Min.
- Gemergte PRs (30 T.)
- 25
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus learningequality/studio
-
Community library status changes don't update `date_updated`Evtl. vergeben @ArpitaSamanta10 hat das vor 14 Tagen übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
learningequality/studio#6414 · 8 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Activation key can activate a different account whose email differs only in caseEvtl. vergeben @Madhu-priya123 hat das vor 5 Tagen übernommen. OffenDEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
learningequality/studio#6410 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
learningequality/studio#6409 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DEV: backend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6407 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Stripe webhook accepts events when no webhook secret is configuredEvtl. vergeben @adibmbrk hat das vor 14 Tagen übernommen. Offencommunity-contribution-in-progress DEV: backend good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
learningequality/studio#6404 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in learningequality/studio
Ähnliche Issues
-
Mend: dependency security vulnerability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ManageIQ/manageiq-ui-service#2259 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
electerious/Ackee#411 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
[bug] 提瓦特记事本原石检测框宽度较窄Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
babalae/bettergi-scripts-list#3905 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] "Configure Colota" opens Colota with "Invalid configuration: No configuration data in URL"Offen
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 87/100
dedicatedcode/reitti#1445 ·
Maintainer antworten meist innerhalb von 1 Tag