Skip to content

dev containers: contributor fixes, headless dev mode and the extension-author container #1487

Open

Description

@ZhuchkaTriplesix

Why

Three things share the same pieces (.devcontainer, docker/, querya-ext-tester, action test-extension, release.yml) and are cheaper to design together:

  1. the contributor dev container has real defects (found while writing docs/dev-containers.md, docs: dev container and local database stack guide #1486);
  2. there is no defined headless way to develop and test Querya: what runs without a display is accidental;
  3. the 0.5.0 Marketplace needs an extension-author dev container (the plan: Feature + test database images + template + registry CI).

1. Contributor dev container: defects

  1. Databases are unreachable from the container. The stack runs on the host daemon (docker-outside-of-docker), so nothing listens on the container's loopback; forwardPorts suggests otherwise.
  2. Flutter differs from CI. The image is ghcr.io/cirruslabs/flutter:3.41.6, CI pins 3.47.1, and the registry has no 3.47.x tag (latest 3.44.0).
  3. The stack's MySQL does not fit the app and the tests. Compose runs mysql:8.4 (caching_sha2_password, needs TLS); the live test stream_take_drain_test.dart connects without TLS and skips. CI uses mysql:8.0 + mysql_native_password.
  4. bubblewrap is missing, so the extension sandbox tests skip.
  5. postStartCommand hides failures (up -d || echo) and does not wait for health.

Fixes: join the container to querya-dev_default on start and fix forwardPorts / portsAttributes to what works; install Flutter 3.47.1 in the Dockerfile from the version in ci.yml and warn on a mismatch; a compose profile live-tests with mysql:8.0 native password on its own port (documented MYSQL_PORT); bubblewrap in the image; docker compose up -d --wait with a clear status.

2. Headless dev mode

Define it as levels, each runnable in a container or on a CI runner with no display, and make each one a single documented command:

Level What Needs State
L0 flutter test sections, e2e, guards Flutter only works (scripts/ci/test_sections.sh)
L1 querya-ext-tester against a test database, --sandbox the tester binary, a database, bubblewrap works; exit codes only correct since 0.4.19 (the main return value was ignored before)
L2 the real app under Xvfb in portable mode: smoke start, MCP end-to-end through querya-mcp, screenshots Xvfb, a debug / release bundle not defined: nothing starts Xvfb, no script, no CI job

Scope:

  • scripts/dev/headless_app.sh: start Xvfb, run the bundle with QUERYA_PORTABLE=1 in an isolated data directory, wait for the window, optionally take a screenshot (import -window root) and stop cleanly; reuse it for a CI smoke job.
  • A docker compose --profile per level so one command brings up exactly what the level needs (no GUI services, no seeds that a level does not use).
  • One short table in docs/dev-containers.md for the three levels.
  • Open question: should L2 grow a real "headless Querya" (core services without a window) for the MCP server? Today querya-mcp needs a running Desktop. Out of scope here, decide after L2 exists.

3. Extension-author container (0.5.0)

Existing: querya-ext-tester (--target-version, --connect, --query, --table, --database, --sandbox, --junit, --tap; release assets querya-ext-tester-v<ver>-<target> and SHA256SUMS.txt), .github/actions/test-extension (to be published as QueryaHub/action-test-extension), the docker/ seeds.

Missing:

  • Dev Container Feature ghcr.io/queryahub/features/querya-ext-tester (version: latest): downloads the tester from the release, checks SHA-256 against SHA256SUMS.txt, puts it in PATH. Source in this repository (devcontainer-features/src/querya-ext-tester), published to GHCR on release. Must require a tester >= 0.4.19.
  • Test database images ghcr.io/queryahub/querya-testdb-<db> built from docker/<db> with the seeds baked in (no bind mounts), tagged with the Querya version and latest; the build matrix is the list of docker/* directories, so a new database appears automatically.
  • extension-template repository: .devcontainer/devcontainer.json (the Feature + docker-in-docker), testenv/compose.yml with the images above, a CI workflow with a matrix of host versions using the action and services:.
  • Registry (extensions): record schema, compat.json, index.json on Pages, PR CI (schema, manifest.json in the archive, SHA-256, only github.com/.../releases/download/..., matrix by engines and testEnv, querya-ext-tester --sandbox), StaticRegistryRepository in the app (today lib/core/market has HttpMarketplaceRepository).
  • release.yml hooks after a release: build and publish the Feature and the querya-testdb-* images (<version> and latest), repository_dispatch to the registry (compat.json, re-run all extensions) and to the template (a bot PR raises the version in devcontainer.json).
  • Nightly check in the registry: asset present and hash equal, otherwise an issue and yanked.

Order

  1. Section 1 fixes and the live-tests profile (small, unblocks the rest).
  2. L2 headless script and the level table (reusable by the Feature's own CI).
  3. The Feature and the querya-testdb-* images, then extension-template (0.5.0).
  4. Registry CI and StaticRegistryRepository (0.5.0).
  5. release.yml hooks and the nightly check (0.5.x).

Acceptance

  • In a fresh container psql -h localhost -U querya querya, redis-cli -h localhost ping and the Querya connection form work without manual steps; flutter --version prints 3.47.1.
  • stream_take_drain_test.dart runs (does not skip) with the documented profile.
  • scripts/dev/headless_app.sh starts the app under Xvfb, finds the window and exits 0; a CI job uses it.
  • devcontainer up on a template that uses the Feature and the compose file reaches querya-ext-tester ./dist --connect ... --sandbox green with no manual install.
  • docs/dev-containers.md has no "not checked" parts.

Activity

  1. added
    bugSomething isn't working
    testsTheme parser epic
    P3Low priority / Polish & Enhancements
    enhancementNew feature or request
    on Oct 11, 2026
  2. changed the title [-]fix(devcontainer): databases unreachable from the container, Flutter and MySQL differ from CI[/-] [+]dev containers: contributor fixes, headless dev mode and the extension-author container[/+] on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priority / Polish & EnhancementsbugSomething isn't workingenhancementNew feature or requesttestsTheme parser epic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions