From b2c1ccbb9bde707bede90d5d7e132f84fa66da8d Mon Sep 17 00:00:00 2001 From: Philippe Weber Date: Thu, 26 May 2016 16:55:29 +0200 Subject: [PATCH 1/2] remove deprecated config queue and name --- CHANGELOG.md | 27 ++++++++++++++++++--------- lib/logstash/inputs/redis.rb | 32 +++----------------------------- logstash-input-redis.gemspec | 2 +- 3 files changed, 22 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a2a399..32dc976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,22 @@ +## 4.0.0 + - breaking,config: Remove deprecated config `queue`. Please use `key` and `data_type`. + - breaking,config: Remove deprecated config `name`. + ## 3.0.1 - - Republish all the gems under jruby. + - Republish all the gems under jruby. + ## 3.0.0 - - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141 -# 2.0.6 - - make integration tests more reliable because of occasional travis failures -# 2.0.5 - - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash -# 2.0.4 - - New dependency requirements for logstash-core for the 5.0 release + - Update the plugin to the version 2.0 of the plugin api, this change is required for Logstash 5.0 compatibility. See https://github.com/elastic/logstash/issues/5141 + +## 2.0.6 + - make integration tests more reliable because of occasional travis failures + +## 2.0.5 + - Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash + +## 2.0.4 + - New dependency requirements for logstash-core for the 5.0 release + ## 2.0.3 - Changed default batch size to 125. Improve batch handling code. Add travis ci build with redis integration. @@ -19,7 +28,7 @@ ## 1.0.3 - Fix typo in module name in test (Causing CI build failures) - ## 1.0.2 +## 1.0.2 - Fix typo in module name (Causing the module to not be loaded) ## 1.0.1 diff --git a/lib/logstash/inputs/redis.rb b/lib/logstash/inputs/redis.rb index 4592422..79bc51e 100644 --- a/lib/logstash/inputs/redis.rb +++ b/lib/logstash/inputs/redis.rb @@ -23,10 +23,6 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable default :codec, "json" - # The `name` configuration is used for logging in case there are multiple instances. - # This feature has no real function and will be removed in future versions. - config :name, :validate => :string, :default => "default", :deprecated => true - # The hostname of your Redis server. config :host, :validate => :string, :default => "127.0.0.1" @@ -42,16 +38,13 @@ module LogStash module Inputs class Redis < LogStash::Inputs::Threadable # Password to authenticate with. There is no authentication by default. config :password, :validate => :password - # The name of the Redis queue (we'll use BLPOP against this). - config :queue, :validate => :string, :deprecated => true - # The name of a Redis list or channel. - config :key, :validate => :string, :required => false + config :key, :validate => :string, :required => true # Specify either list or channel. If `redis\_type` is `list`, then we will BLPOP the # key. If `redis\_type` is `channel`, then we will SUBSCRIBE to the key. # If `redis\_type` is `pattern_channel`, then we will PSUBSCRIBE to the key. - config :data_type, :validate => [ "list", "channel", "pattern_channel" ], :required => false + config :data_type, :validate => [ "list", "channel", "pattern_channel" ], :required => true # The number of events to return from Redis using EVAL. config :batch_count, :validate => :number, :default => 125 @@ -77,24 +70,6 @@ def new_redis_instance def register @redis_url = "redis://#{@password}@#{@host}:#{@port}/#{@db}" - # TODO remove after setting key and data_type to true - if @queue - if @key || @data_type - raise RuntimeError.new( - "Cannot specify queue parameter and key or data_type" - ) - end - @key = @queue - @data_type = 'list' - end - - if !@key || !@data_type - raise RuntimeError.new( - "Must define queue, or key and data_type parameters" - ) - end - # end TODO - @redis_builder ||= method(:internal_redis_builder) # just switch on data_type once @@ -111,8 +86,7 @@ def register @list_method = batched? ? method(:list_batch_listener) : method(:list_single_listener) - # TODO(sissel, boertje): set @identity directly when @name config option is removed. - @identity = @name != 'default' ? @name : "#{@redis_url} #{@data_type}:#{@key}" + @identity = "#{@redis_url} #{@data_type}:#{@key}" @logger.info("Registering Redis", :identity => @identity) end # def register diff --git a/logstash-input-redis.gemspec b/logstash-input-redis.gemspec index 2a7dad2..e4a926b 100644 --- a/logstash-input-redis.gemspec +++ b/logstash-input-redis.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-input-redis' - s.version = '3.0.1' + s.version = '4.0.0' s.licenses = ['Apache License (2.0)'] s.summary = "This input will read events from a Redis instance" s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program" From cfb308c5f59a9b573137fe21e91812cd95b11def Mon Sep 17 00:00:00 2001 From: Philippe Weber Date: Fri, 27 May 2016 06:03:48 +0200 Subject: [PATCH 2/2] raise only minor version --- CHANGELOG.md | 2 +- logstash-input-redis.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32dc976..b35ba21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.0.0 +## 3.1.0 - breaking,config: Remove deprecated config `queue`. Please use `key` and `data_type`. - breaking,config: Remove deprecated config `name`. diff --git a/logstash-input-redis.gemspec b/logstash-input-redis.gemspec index e4a926b..170383a 100644 --- a/logstash-input-redis.gemspec +++ b/logstash-input-redis.gemspec @@ -1,7 +1,7 @@ Gem::Specification.new do |s| s.name = 'logstash-input-redis' - s.version = '4.0.0' + s.version = '3.1.0' s.licenses = ['Apache License (2.0)'] s.summary = "This input will read events from a Redis instance" s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"