Prioritize native database installations over Docker#4302
Open
kyleconroy wants to merge 1 commit intomainfrom
Open
Prioritize native database installations over Docker#4302kyleconroy wants to merge 1 commit intomainfrom
kyleconroy wants to merge 1 commit intomainfrom
Conversation
Change the database selection order in local/postgres.go and local/mysql.go to try native installations first and fall back to Docker, instead of the previous Docker-first ordering. This better suits environments where databases are installed natively (e.g., CI or remote development), avoiding unnecessary Docker overhead. https://claude.ai/code/session_01XbZNE4YfrtML4B6sLVf2E3
Contributor
|
Hey, I was looking at the CI failures and noticed something interesting. Looking at the logs, MySQL tests are all failing with: And for PostgreSQL there's a different failure: I also took a look at |
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
This change reorders the database server startup logic to prioritize native installations over Docker containers in the SQL test utilities for both MySQL and PostgreSQL.
Key Changes
MySQL tests (
internal/sqltest/local/mysql.go):PostgreSQL tests (
internal/sqltest/local/postgres.go):Skip messages: Updated error messages in both files to reflect the new priority order (native before Docker)
Rationale
This change ensures that native database installations are preferred when available, as they typically offer better performance and lower overhead compared to Docker containers. Docker is now used as a fallback option only when native installations are not available.
https://claude.ai/code/session_01XbZNE4YfrtML4B6sLVf2E3