Hello community, here is the log from the commit of package rubygem-bunny for openSUSE:Factory checked in at 2018-06-08 23:14:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-bunny (Old) and /work/SRC/openSUSE:Factory/.rubygem-bunny.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bunny" Fri Jun 8 23:14:38 2018 rev:42 rq:614296 version:2.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-bunny/rubygem-bunny.changes 2018-02-22 15:03:43.587238797 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-bunny.new/rubygem-bunny.changes 2018-06-08 23:14:38.657843534 +0200 @@ -1,0 +2,6 @@ +Tue Jun 5 11:00:45 UTC 2018 - factory-a...@kulow.org + +- updated to version 2.10.0 + see installed ChangeLog.md + +------------------------------------------------------------------- Old: ---- bunny-2.9.2.gem New: ---- bunny-2.10.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-bunny.spec ++++++ --- /var/tmp/diff_new_pack.pAHVeN/_old 2018-06-08 23:14:39.329819266 +0200 +++ /var/tmp/diff_new_pack.pAHVeN/_new 2018-06-08 23:14:39.329819266 +0200 @@ -24,7 +24,7 @@ # Name: rubygem-bunny -Version: 2.9.2 +Version: 2.10.0 Release: 0 %define mod_name bunny %define mod_full_name %{mod_name}-%{version} ++++++ bunny-2.9.2.gem -> bunny-2.10.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2018-02-22 01:59:39.000000000 +0100 +++ new/.travis.yml 2018-06-05 12:06:33.000000000 +0200 @@ -1,13 +1,16 @@ language: ruby bundler_args: --without development cache: bundler +before_install: + - gem install bundler before_script: "./bin/ci/before_build" script: "bundle exec rake integration_without_recovery" rvm: - ruby-head - - "2.4.1" - - "2.3.4" - - "2.2.7" + - "2.5.1" + - "2.4.2" + - "2.3.5" + - "2.2.8" notifications: email: mich...@rabbitmq.com services: @@ -15,6 +18,11 @@ branches: only: - master - - 2.6.x-stable + - 2.9.x-stable + - 2.8.x-stable env: - CI=true +matrix: + allow_failures: + rvm: + - ruby-head diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ChangeLog.md new/ChangeLog.md --- old/ChangeLog.md 2018-02-22 01:59:39.000000000 +0100 +++ new/ChangeLog.md 2018-06-05 12:06:33.000000000 +0200 @@ -1,13 +1,68 @@ -## Changes between Bunny 2.9.1 and 2.9.2 (unreleased) +## Changes between Bunny 2.10.0 and 2.11.0 (unreleased) No changes yet. -## Changes between Bunny 2.9.0 and 2.9.1 (Jan 11th, 2018) +## Changes between Bunny 2.9.0 and 2.10.0 (Jun 5th, 2018) -### Default CA Certificate Paths are Respected Again +`2.10.0` is a maintenance release that introduces a couple of +**minor potentially breaking changes**. -GitHub issue: [#539](https://github.com/ruby-amqp/bunny/issues/539). +### Disabling Heartbeats Also Disables TCP Socket Read Timeouts + +Disabling heartbeats will now disable TCP socket read timeouts. + +They go hand in hand and users who prefer TCP keepalives via +kernel configuration previously had to also explicitly configure +a zero read timeout. + +GitHub issue: [#551](https://github.com/ruby-amqp/bunny/pull/551). + +Contributed by Carl Hörberg. + + +### `verify_peer: false` Has the Expected Effect Again + +Make sure `verify_peer: false` has the expected effect again. + +Default value of connection's `:verify_peer` option to `true` only when +all of `:verify_ssl`, `:verify_peer`, and `:verify` are `nil`. + +GitHub issue: [#541](https://github.com/ruby-amqp/bunny/issues/541). + +Contributed by Howard Ding. + + +### Maximum Number of Channels Limited to 2K by Default + +Default maximum number of channels is limited to 2047 to reduce the probability +of severe channel leaks. See [rabbitmq/rabbitmq-server#1593](https://github.com/rabbitmq/rabbitmq-server/issues/1593) for details. + +Applications that want to use more channels per connection can still configure a higher value +using the `channel_max` setting (for both Bunny and RabbitMQ server). + +GitHub issue: [#553](https://github.com/ruby-amqp/bunny/pull/553). + + + +### Squashed Some Warnings + +GitHub issue: [#552](https://github.com/ruby-amqp/bunny/pull/552). + +Contributed by @utilum. + + + +### Disabling Heartbeats Disables TCP Socket Read Timeouts + +Disabling heartbeats will also disable TCP socket read timeouts, +since the two are effectively interconnected. In this case a mechanism +such as [TCP keepalives](http://www.rabbitmq.com/heartbeats.html#tcp-keepalives) is assumed to be used. + +See [RabbitMQ heartbeats guide](http://www.rabbitmq.com/heartbeats.html) for a more +detailed overview of the options. + +GH issue: [#519](https://github.com/ruby-amqp/bunny/issues/519). Contributed by Carl Hörberg. @@ -19,12 +74,23 @@ Bunny now requires Ruby 2.2. -### Support for Additional URI Query Parameters +### Connection Recovery Now Retries on Timeouts + +Connection recovery now will retry on TCP connection timeouts. + +GitHub issue: [#537](https://github.com/ruby-amqp/bunny/pull/537). -GitHub issue: [#534](https://github.com/ruby-amqp/bunny/pull/534). + +### More URI Query Parameters + +Bunny now supports more URI query parameters plus aliases +that are identical to those of the server. Contributed by Andrew Babichev. +GitHub issue: [#534](https://github.com/ruby-amqp/bunny/pull/534) + + ## Changes between Bunny 2.7.0 and 2.8.0 (Dec 18th, 2018) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-02-22 01:59:39.000000000 +0100 +++ new/README.md 2018-06-05 12:06:33.000000000 +0200 @@ -48,7 +48,7 @@ Modern Bunny versions support - * CRuby 2.0 through 2.4 + * CRuby 2.2 through 2.5 (inclusive) Bunny works sufficiently well on JRuby but there are known JRuby bugs in versions prior to JRuby 9000 that cause high CPU burn. JRuby users should @@ -95,7 +95,7 @@ To use Bunny in a project managed with Bundler: ``` ruby -gem "bunny", ">= 2.8.0" +gem "bunny", ">= 2.9.2" ``` Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/channel.rb new/lib/bunny/channel.rb --- old/lib/bunny/channel.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/channel.rb 2018-06-05 12:06:33.000000000 +0200 @@ -169,6 +169,17 @@ @connection = connection @logger = connection.logger @id = id || @connection.next_channel_id + + # channel allocator is exhausted + if @id < 0 + msg = "Cannot open a channel: max number of channels on connection reached. Connection channel_max value: #{@connection.channel_max}" + @logger.error(msg) + + raise msg + else + @logger.debug { "Allocated channel id: #{@id}" } + end + @status = :opening @connection.register_channel(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/channel_id_allocator.rb new/lib/bunny/channel_id_allocator.rb --- old/lib/bunny/channel_id_allocator.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/channel_id_allocator.rb 2018-06-05 12:06:33.000000000 +0200 @@ -17,7 +17,9 @@ # # @param [Integer] max_channel Max allowed channel id - def initialize(max_channel = ((1 << 16) - 1)) + def initialize(max_channel = ((1 << 11) - 1)) + # channel 0 has special meaning in the protocol, so start + # allocator at 1 @allocator = AMQ::IntAllocator.new(1, max_channel) @mutex = Monitor.new end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/cruby/ssl_socket.rb new/lib/bunny/cruby/ssl_socket.rb --- old/lib/bunny/cruby/ssl_socket.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/cruby/ssl_socket.rb 2018-06-05 12:06:33.000000000 +0200 @@ -107,7 +107,7 @@ end end - rescue LoadError => le + rescue LoadError puts "Could not load OpenSSL" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/session.rb new/lib/bunny/session.rb --- old/lib/bunny/session.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/session.rb 2018-06-05 12:06:33.000000000 +0200 @@ -36,10 +36,10 @@ DEFAULT_HEARTBEAT = :server # @private DEFAULT_FRAME_MAX = 131072 - # 2^16 - 1, maximum representable signed 16 bit integer. + # Hard limit the user cannot go over regardless of server configuration. # @private CHANNEL_MAX_LIMIT = 65535 - DEFAULT_CHANNEL_MAX = CHANNEL_MAX_LIMIT + DEFAULT_CHANNEL_MAX = 2047 # backwards compatibility # @private @@ -101,7 +101,7 @@ # @option connection_string_or_opts [String] :username ("guest") Username # @option connection_string_or_opts [String] :password ("guest") Password # @option connection_string_or_opts [String] :vhost ("/") Virtual host to use - # @option connection_string_or_opts [Integer, Symbol] :heartbeat (:server) Heartbeat interval. :server means use the default suggested by RabbitMQ. 0 means no heartbeat (not recommended). + # @option connection_string_or_opts [Integer, Symbol] :heartbeat (:server) Heartbeat interval. :server means use the default suggested by RabbitMQ. 0 means heartbeats and socket read timeouts will be disabled (not recommended). # @option connection_string_or_opts [Integer] :network_recovery_interval (4) Recovery interval periodic network recovery will use. This includes initial pause after network failure. # @option connection_string_or_opts [Boolean] :tls (false) Should TLS/SSL be used? # @option connection_string_or_opts [String] :tls_cert (nil) Path to client TLS/SSL certificate file (.pem) @@ -109,9 +109,10 @@ # @option connection_string_or_opts [Array<String>] :tls_ca_certificates Array of paths to TLS/SSL CA files (.pem), by default detected from OpenSSL configuration # @option connection_string_or_opts [String] :verify_peer (true) Whether TLS peer verification should be performed # @option connection_string_or_opts [Symbol] :tls_version (negotiated) What TLS version should be used (:TLSv1, :TLSv1_1, or :TLSv1_2) + # @option connection_string_or_opts [Integer] :channel_max (2047) Maximum number of channels allowed on this connection, minus 1 to account for the special channel 0. # @option connection_string_or_opts [Integer] :continuation_timeout (15000) Timeout for client operations that expect a response (e.g. {Bunny::Queue#get}), in milliseconds. # @option connection_string_or_opts [Integer] :connection_timeout (30) Timeout in seconds for connecting to the server. - # @option connection_string_or_opts [Integer] :read_timeout (30) TCP socket read timeout in seconds. + # @option connection_string_or_opts [Integer] :read_timeout (30) TCP socket read timeout in seconds. If heartbeats are disabled this will be ignored. # @option connection_string_or_opts [Integer] :write_timeout (30) TCP socket write timeout in seconds. # @option connection_string_or_opts [Proc] :hosts_shuffle_strategy A Proc that reorders a list of host strings, defaults to Array#shuffle # @option connection_string_or_opts [Logger] :logger The logger. If missing, one is created using :log_file and :log_level. @@ -1068,7 +1069,9 @@ # threads publish on the same channel aggressively, at some point frames will be # delivered out of order and broker will raise 505 UNEXPECTED_FRAME exception. # If we synchronize on the channel, however, this is both thread safe and pretty fine-grained - # locking. Note that "single frame" methods do not need this kind of synchronization. MK. + # locking. Note that "single frame" methods technically do not need this kind of synchronization + # (no incorrect frame interleaving of the same kind as with basic.publish isn't possible) but we + # still recommend not sharing channels between threads except for consumer-only cases in the docs. MK. channel.synchronize do # see rabbitmq/rabbitmq-server#156 data = frames.reduce("") { |acc, frame| acc << frame.encode } @@ -1087,7 +1090,7 @@ # threads publish on the same channel aggressively, at some point frames will be # delivered out of order and broker will raise 505 UNEXPECTED_FRAME exception. # If we synchronize on the channel, however, this is both thread safe and pretty fine-grained - # locking. Note that "single frame" methods do not need this kind of synchronization. MK. + # locking. See a note about "single frame" methods in a comment in `send_frameset`. MK. channel.synchronize do frames.each { |frame| self.send_frame_without_timeout(frame, false) } signal_activity! @@ -1177,26 +1180,18 @@ @logger.debug { "Heartbeat interval negotiation: client = #{@client_heartbeat}, server = #{connection_tune.heartbeat}, result = #{@heartbeat}" } @logger.info "Heartbeat interval used (in seconds): #{@heartbeat}" - # We set the read_write_timeout to twice the heartbeat value + # We set the read_write_timeout to twice the heartbeat value, + # and then some padding for edge cases. # This allows us to miss a single heartbeat before we time out the socket. - # - # Since RabbitMQ can be configured to disable heartbeats (bad idea but technically - # possible nonetheless), we need to take both client and server values into - # consideration when deciding about using the heartbeat value for read timeouts. - @transport.read_timeout = if heartbeat_disabled?(@client_heartbeat) || heartbeat_disabled?(@heartbeat) - @logger.debug { "Will use default socket read timeout of #{Transport::DEFAULT_READ_TIMEOUT}" } - Transport::DEFAULT_READ_TIMEOUT - else - # pad to account for edge cases. MK. - n = @heartbeat * 2.2 - @logger.debug { "Will use socket read timeout of #{n}" } - n - end - + # If heartbeats are disabled, assume that TCP keepalives or a similar mechanism will be used + # and disable socket read timeouts. See ruby-amqp/bunny#551. + @transport.read_timeout = @heartbeat * 2.2 + @logger.debug { "Will use socket read timeout of #{@transport.read_timeout}" } # if there are existing channels we've just recovered from # a network failure and need to fix the allocated set. See issue 205. MK. if @channels.empty? + @logger.debug { "Initializing channel ID allocator with channel_max = #{@channel_max}" } @channel_id_allocator = ChannelIdAllocator.new(@channel_max) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/transport.rb new/lib/bunny/transport.rb --- old/lib/bunny/transport.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/transport.rb 2018-06-05 12:06:33.000000000 +0200 @@ -29,6 +29,10 @@ attr_reader :tls_context, :verify_peer, :tls_ca_certificates, :tls_certificate_path, :tls_key_path attr_writer :read_timeout + def read_timeout=(v) + @read_timeout = v + @read_timeout = nil if @read_timeout == 0 + end def initialize(session, host, port, opts) @session = session diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bunny/version.rb new/lib/bunny/version.rb --- old/lib/bunny/version.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/lib/bunny/version.rb 2018-06-05 12:06:33.000000000 +0200 @@ -2,5 +2,5 @@ module Bunny # @return [String] Version of the library - VERSION = "2.9.2" + VERSION = "2.10.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-02-22 01:59:39.000000000 +0100 +++ new/metadata 2018-06-05 12:06:33.000000000 +0200 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: bunny version: !ruby/object:Gem::Version - version: 2.9.2 + version: 2.10.0 platform: ruby authors: - Chris Duncan @@ -12,7 +12,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2018-02-22 00:00:00.000000000 Z +date: 2018-06-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: amq-protocol @@ -232,7 +232,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.14 +rubygems_version: 2.6.11 signing_key: specification_version: 4 summary: Popular easy to use Ruby client for RabbitMQ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/higher_level_api/integration/tls_connection_spec.rb new/spec/higher_level_api/integration/tls_connection_spec.rb --- old/spec/higher_level_api/integration/tls_connection_spec.rb 2018-02-22 01:59:40.000000000 +0100 +++ new/spec/higher_level_api/integration/tls_connection_spec.rb 2018-06-05 12:06:33.000000000 +0200 @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- require "spec_helper" +require "socket" + unless ENV["CI"] CERTIFICATE_DIR = ENV.fetch("BUNNY_CERTIFICATE_DIR", "./spec/tls") puts "Will use certificates from #{CERTIFICATE_DIR}" @@ -35,7 +37,7 @@ end def local_hostname - ENV.fetch("BUNNY_RABBITMQ_HOSTNAME", "127.0.0.1") + ENV.fetch("BUNNY_RABBITMQ_HOSTNAME", "localhost") end context "initialized with :tls => true" do