Repository navigation
fix(devcontainer): reachable databases, Flutter 3.47.1, bubblewrap, live-tests profile (#1487, part 1) - #1617
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.scripts/dev/devcontainer_start.shjoins the container toquerya-dev_defaultand forwards127.0.0.1:<port>to the services withsocat(5432, 3306, 6379, 27017, 8123, 9000, and 3307 formysql-live). Ports something already listens on are skipped; host networking keeps working.forwardPorts/portsAttributesnow describe ports that are really served..devcontainer/Dockerfileis Ubuntu 24.04 + Flutter cloned atARG FLUTTER_VERSION=3.47.1(the cirruslabs registry has no 3.47.x tag).test/guards/devcontainer_flutter_version_test.dartfails when the ARG andflutter-versioninci.ymldiffer; the image workflow reads the ARG and checksflutter --version.live-tests:mysql-live=mysql:8.0+mysql_native_passwordonMYSQL_LIVE_PORT(default 3307), same server CI starts. RunMYSQL_PORT=3307 flutter test test/core/database/stream_take_drain_test.dart.bubblewrapmissingsocat); the smoke test runsbwrap --version.postStartCommandhides failures, does not waitup -d, waits up toQUERYA_STACK_TIMEOUT(180 s) for the five long-running services to be healthy, prints which are not and thecompose pstable. It never fails the container start. I did not useup --wait: the one-shot seed jobs (redis-seed,sqlite-seed) exit by design.docs/dev-containers.mdis updated for all of it (the "Known gaps" Flutter workaround is gone).Not verified here
.devcontainer/Dockerfile); I did not build it locally. Ifflutter precache --linuxor thegit cloneof the tag fails there, that is the thing to look at.devcontainer_start.shpassesbash -n, anddocker compose configaccepts the compose file with and without the profile; the forwarding itself was not run inside a dev container.Acceptance of the issue covered by this PR
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.dartruns with the documented profileRefs #1487