Use concrete Trilogy retry exception classes#183
Open
neilshopify wants to merge 6 commits into
Open
Conversation
Author
|
@coding-chimp would you mind taking a look when you have a chance? This fixes the |
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
Trilogy::ConnectionErrorretry key with concrete Trilogy connection exception classes.Exceptionclasses so newerretriableversions accept the config.max_elapsed_time: Float::MAXinstead ofFloat::INFINITYfor an effectively unbounded elapsed time in a format accepted by both older and newerretriable.lhm-shopifyto4.5.2.Why
Newer
retriableversions validate theon:configuration before running the retried block. Each retry key must be an exception class, or a collection of exception classes.Trilogy::ConnectionErroris a module, not an exception class, andmax_elapsed_time: Float::INFINITYis no longer accepted by newerretriableas a finite non-negative number. LHM can fail during retry configuration validation with errors like:This changes the Trilogy retry config to use concrete exception classes such as
Trilogy::BaseConnectionError,Trilogy::SSLError,Trilogy::ConnectionClosed, and the concrete syscall error classes, preserving the intended retry behavior while remaining compatible with stricterretriablevalidation.Release
This PR bumps the gem version to
4.5.2and updates the changelog/lockfiles. After merge, a maintainer can publish with:bundle exec rake releaseTest
bundle installbundle exec appraisal installbundle exec ruby -I spec spec/unit/sql_retry_spec.rbbundle exec rake build