feat: Add PostgreSQL 18 driver + driver refactor#33
Open
Unbreathable wants to merge 9 commits intomainfrom
Open
feat: Add PostgreSQL 18 driver + driver refactor#33Unbreathable wants to merge 9 commits intomainfrom
Unbreathable wants to merge 9 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new PostgreSQL 18 service driver under pkg/databases/postgres, refactors Docker container lifecycle logic into reusable mrunner/services helpers, and migrates the legacy driver + real-project example to the new API.
Changes:
- Introduce new PostgreSQL 18 driver (
pkg/databases/postgres) with container lifecycle, health checks, initialization, and instruction handling. - Add
mrunner/serviceshelpers for managed container create/recreate + container exec, and update the legacy driver to use them. - Update
examples/real-projectto use the new PostgreSQL 18 driver.
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/databases/postgres/postgres.go | New PostgreSQL 18 driver implementation and config helpers |
| pkg/databases/postgres/postgres_container.go | Container creation/health/init for new driver via mservices |
| pkg/databases/postgres/postgres_instruct.go | Clear/drop table instructions for new driver |
| pkg/databases/postgres/go.mod | New submodule definition for postgres driver |
| pkg/databases/postgres/go.sum | Dependency locks for new postgres submodule |
| pkg/databases/postgres-legacy/postgres_legacy_container.go | Refactored legacy container lifecycle to use mservices helpers |
| pkg/databases/postgres-legacy/postgres_legacy.go | Updated legacy driver docs/comments |
| pkg/databases/postgres-legacy/go.mod | Dependency cleanup / reclassification (direct -> indirect) |
| mrunner/services/containers.go | New shared “managed container” creation/recreate logic |
| mrunner/services/containers_exec.go | New shared helper to exec commands in containers |
| go.work | Add postgres driver submodule to workspace |
| examples/real-project/starter/config.go | Switch example to new postgres (18) driver |
| examples/real-project/go.mod | Switch example module dependency/replace to new postgres driver |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Description
pkg/databasesdirectory for drivers that supports PostgreSQL 18 and its new container layoutmservicespackage for more easily creating driversreal-projectexample has been updated to use the new PostgreSQL 18 driver