Skip to content

fix(devcontainer): reachable databases, Flutter 3.47.1, bubblewrap, live-tests profile (#1487, part 1) - #1617

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1487-devcontainer-fixes
Oct 15, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue/1487-devcontainer-fixes

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

Section 1 of #1487 (contributor dev container defects). Sections 2 and 3 (headless L2 script, extension-author container) are not part of this PR, so it says Refs.

Defect Change
Databases unreachable from the container (DooD: nothing listens on its loopback) scripts/dev/devcontainer_start.sh joins the container to querya-dev_default and forwards 127.0.0.1:<port> to the services with socat (5432, 3306, 6379, 27017, 8123, 9000, and 3307 for mysql-live). Ports something already listens on are skipped; host networking keeps working. forwardPorts / portsAttributes now describe ports that are really served.
Flutter differs from CI .devcontainer/Dockerfile is Ubuntu 24.04 + Flutter cloned at ARG FLUTTER_VERSION=3.47.1 (the cirruslabs registry has no 3.47.x tag). test/guards/devcontainer_flutter_version_test.dart fails when the ARG and flutter-version in ci.yml differ; the image workflow reads the ARG and checks flutter --version.
MySQL 8.4 does not fit the live test compose profile live-tests: mysql-live = mysql:8.0 + mysql_native_password on MYSQL_LIVE_PORT (default 3307), same server CI starts. Run MYSQL_PORT=3307 flutter test test/core/database/stream_take_drain_test.dart.
bubblewrap missing installed in the image (plus socat); the smoke test runs bwrap --version.
postStartCommand hides failures, does not wait the script runs up -d, waits up to QUERYA_STACK_TIMEOUT (180 s) for the five long-running services to be healthy, prints which are not and the compose ps table. It never fails the container start. I did not use up --wait: the one-shot seed jobs (redis-seed, sqlite-seed) exit by design.

docs/dev-containers.md is updated for all of it (the "Known gaps" Flutter workaround is gone).

Not verified here

  • The image build and the smoke test run in the Dev container image workflow of this PR (it triggers on .devcontainer/Dockerfile); I did not build it locally. If flutter precache --linux or the git clone of the tag fails there, that is the thing to look at.
  • devcontainer_start.sh passes bash -n, and docker compose config accepts the compose file with and without the profile; the forwarding itself was not run inside a dev container.
  • The sandbox tests may still skip inside a container because of nested user namespaces (documented).

Acceptance of the issue covered by this PR

  • fresh container: psql -h localhost -U querya querya, redis-cli -h localhost ping, flutter --version = 3.47.1 (needs a run in a real container)
  • stream_take_drain_test.dart runs with the documented profile

Refs #1487

…ive-tests profile

Section 1 of #1487.

- scripts/dev/devcontainer_start.sh replaces the postStartCommand that hid
  failures: it starts the stack, waits for the databases to be healthy, joins
  the container to querya-dev_default and forwards localhost:<port> to the
  services with socat, so psql -h localhost works from the container.
- The image is Ubuntu 24.04 with Flutter cloned at ARG FLUTTER_VERSION (3.47.1,
  as in ci.yml; a guard test fails when they differ), plus bubblewrap and
  socat. The image workflow reads the version from the ARG and checks it.
- Compose profile live-tests: mysql:8.0 with mysql_native_password on
  MYSQL_LIVE_PORT (3307), the server CI uses for stream_take_drain_test.
- docs/dev-containers.md describes all of the above.

Refs #1487
@github-actions github-actions Bot added bug Something isn't working enhancement New feature or request tests Theme parser epic P3 Low priority / Polish & Enhancements labels Oct 15, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit c6e727f into dev Oct 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request P3 Low priority / Polish & Enhancements tests Theme parser epic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant