Fix railsmaster CI with pglite 0.1.1 compatibility shim#63
Open
MattyMc wants to merge 1 commit into
Open
Conversation
pglite 0.1.1 is missing the connection methods Rails main now calls (close, finished?, status) and answers nil to parameter_status, which makes Rails send a session timezone SET that crashes the wasm build. Shim the connection until a pglite release covers it.
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.
pglite 0.1.1 is missing a few PG-compatible connection APIs that Rails main now calls during connection setup. It also returns
nilforparameter_status("TimeZone"), which causes Rails to send a session time zoneSETstatement that crashes the wasm instance.This PR adds a small compatibility shim for pglite 0.1.1 so the railsmaster CI job can run until pglite releases native support for these APIs.
Fixes #62
What is the purpose of this pull request?
Fix the
railsmasterCI job when running againstpglite 0.1.1.What changes did you make? (overview)
Added a version-pinned compatibility patch for
pglite <= 0.1.1that:PG::CONNECTION_OKif missingPGlite::Connection#close#finished?report the connection as open#status"UTC"forparameter_status("TimeZone")so Rails does not send a time zoneSETThe patch is intentionally scoped to
pglite <= 0.1.1so it should retire once pglite ships the missing compatibility methods.Is there anything you'd like reviewers to focus on?
The main thing to review is whether
spec_helper.rbis the right place for this temporary shim. It needs to run before any support files trigger database access.Checklist