-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking change in pg 1.4.0? PG::Error
signature changed
#466
Comments
Not used in our code, but some users do this and it used to work in pg<1.4.0. Fixes ged#466
@larskanis thanks for the fix in #467. I'd like to request a new release with this change. In our example, we had PG connection code with tests verifying how we handled exceptions raised at the PG level. expect(Foo).to receive(:bar).and_raise(PG::Error) This started breaking in We can fix it with: expect(Foo).to receive(:bar).and_raise(PG::Error('')) But this is less than optimal so we'd like to use 1.4.1 with this fix in it. Thanks in advance! |
pg 1.4.0 was released with a breaking change to the interface for the PG::Error class: ged/ruby-pg@91b00d0 It was repored in ged/ruby-pg#466 and fixed in ged/ruby-pg#467 but not yet released. 1.4.0 was breaking our pg logical spec as seen below 1) PglogicalSubscription#backlog returns nil if error raised inside Failure/Error: MiqRegionRemote.with_remote_connection(host, port || 5432, user, decrypted_password, dbname, "postgresql", connect_timeout) do |conn| yield conn end ArgumentError: wrong number of arguments (given 0, expected 1) # ./app/models/pglogical_subscription.rb:294:in `with_remote_connection' # ./app/models/pglogical_subscription.rb:289:in `remote_region_lsn' # ./app/models/pglogical_subscription.rb:104:in `backlog' # ./spec/models/pglogical_subscription_spec.rb:495:in `block (3 levels) in <top (required)>'
pg 1.4.0 was released with a breaking change to the interface for the PG::Error class: ged/ruby-pg@91b00d0 It was reported in ged/ruby-pg#466 and fixed in ged/ruby-pg#467 but not yet released. 1.4.0 was breaking our pg logical spec as seen below 1) PglogicalSubscription#backlog returns nil if error raised inside Failure/Error: MiqRegionRemote.with_remote_connection(host, port || 5432, user, decrypted_password, dbname, "postgresql", connect_timeout) do |conn| yield conn end ArgumentError: wrong number of arguments (given 0, expected 1) # ./app/models/pglogical_subscription.rb:294:in `with_remote_connection' # ./app/models/pglogical_subscription.rb:289:in `remote_region_lsn' # ./app/models/pglogical_subscription.rb:104:in `backlog' # ./spec/models/pglogical_subscription_spec.rb:495:in `block (3 levels) in <top (required)>'
pg-1.4.1 is pushed with the above fix to PG::Error. |
1.4.0 led to ged/ruby-pg#466 and was fixed in ged/ruby-pg#467 Since 1.4.1 is now released and fixes the issue, we can safely unlock pg except for version 1.4.0.
Thank you @larskanis. 1.4.1 works for us. 🙇 |
pg 1.4.0 was released with a breaking change to the interface for the PG::Error class: ged/ruby-pg@91b00d0 It was reported in ged/ruby-pg#466 and fixed in ged/ruby-pg#467 but not yet released. 1.4.0 was breaking our pg logical spec as seen below 1) PglogicalSubscription#backlog returns nil if error raised inside Failure/Error: MiqRegionRemote.with_remote_connection(host, port || 5432, user, decrypted_password, dbname, "postgresql", connect_timeout) do |conn| yield conn end ArgumentError: wrong number of arguments (given 0, expected 1) # ./app/models/pglogical_subscription.rb:294:in `with_remote_connection' # ./app/models/pglogical_subscription.rb:289:in `remote_region_lsn' # ./app/models/pglogical_subscription.rb:104:in `backlog' # ./spec/models/pglogical_subscription_spec.rb:495:in `block (3 levels) in <top (required)>'
1.4.0 led to ged/ruby-pg#466 and was fixed in ged/ruby-pg#467 Since 1.4.1 is now released and fixes the issue, we can safely unlock pg except for version 1.4.0.
pg 1.4.0 was released with a breaking change to the interface for the PG::Error class: ged/ruby-pg@91b00d0 It was reported in ged/ruby-pg#466 and fixed in ged/ruby-pg#467 but not yet released. 1.4.0 was breaking our pg logical spec as seen below 1) PglogicalSubscription#backlog returns nil if error raised inside Failure/Error: MiqRegionRemote.with_remote_connection(host, port || 5432, user, decrypted_password, dbname, "postgresql", connect_timeout) do |conn| yield conn end ArgumentError: wrong number of arguments (given 0, expected 1) # ./app/models/pglogical_subscription.rb:294:in `with_remote_connection' # ./app/models/pglogical_subscription.rb:289:in `remote_region_lsn' # ./app/models/pglogical_subscription.rb:104:in `backlog' # ./spec/models/pglogical_subscription_spec.rb:495:in `block (3 levels) in <top (required)>'
1.4.0 led to ged/ruby-pg#466 and was fixed in ged/ruby-pg#467 Since 1.4.1 is now released and fixes the issue, we can safely unlock pg except for version 1.4.0.
Before 1.4.0 it was possible to
raise
PG errors without any arguments: https://github.com/ged/ruby-pg/blob/v1.3.5/lib/pg/exceptions.rbWith 1.4.0 it is not: https://github.com/ged/ruby-pg/blob/v1.4.0/lib/pg/exceptions.rb
The text was updated successfully, but these errors were encountered: