fix(codespaces): make devcontainer setup fail loudly and wait for the database - #64634
Closed
miaulalala wants to merge 1 commit into
Closed
miaulalala wants to merge 1 commit into
miaulalala wants to merge 1 commit into
Conversation
… database The setup script had no error handling, so any failure left a codespace that looked like it had started correctly. Apache is restarted unconditionally on the last line, so the browser served the database setup wizard instead of a working instance, with nothing in the output pointing at the real cause. Three changes: - set -euo pipefail, so a failure is reported where it happens instead of being discovered later in the browser. - Wait for Postgres before installing. The db service has no healthcheck and compose only guarantees the container was started, not that initdb had finished, so maintenance:install could race it on a first create. The probe uses PHP because the image installs php8.4-pgsql but not postgresql-client, so pg_isready is not available. - Verify 3rdparty is populated after the submodule update, and verify the instance reports installed: true before handing it over. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Anna Larch <anna@nextcloud.com>
miaulalala
requested review from
Altahrim,
come-nc,
leftybournes and
provokateurin
and removed request for
a team
September 21, 2026 14:21
Member
|
You're not following the PR template and also not the AI policy regarding human-written communication: https://github.com/nextcloud/.github/blob/master/AI_POLICY.md#human-written-communication |
Contributor
Author
Sorry, this was not supposed to go live. I'll resubmit. |
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.
Reported at a developer-environment clinic: a Codespace on
mastercomes up showing the database setup wizard instead of a finished install, with nothing in the output explaining why..devcontainer/setup.shhad no error handling and restarts Apache unconditionally on its last line, so any failure produces a Codespace that looks like it started correctly.set -euo pipefail, so a failure is reported where it happens.dbservice has no healthcheck and Compose only guarantees the container started, not thatinitdbfinished, somaintenance:installcould race it.3rdpartyis populated and that the instance reportsinstalled: truebefore handing over.The readiness probe uses PHP rather than
pg_isready, because the image installsphp8.4-pgsqlbut notpostgresql-client. A separately reported 503 onstable34is not confirmed to share this cause; this change should at least make the creation log say what is failing.🤖 Generated with Claude Code