logstash-plugins / logstash-filter-kv

Apache License 2.0
17 stars 42 forks source link

All jobs failling #49

Closed ph closed 7 years ago

ph commented 7 years ago

https://travis-ci.org/logstash-plugins/logstash-filter-kv/builds/236500782


Failures:
  1) LogStash::Filters::KV keys without values (reported in #22) key and splitters with no value should ignore the incomplete key/value pairs
     Failure/Error:
       expect(event.to_hash.keys.sort).to eq(
         ["@timestamp", "@version", "AccountStatus", "IsSuccess", "message", "tags"])

       expected: ["@timestamp", "@version", "AccountStatus", "IsSuccess", "message", "tags"]
            got: ["@timestamp", "@version", "AccountStatus", "IsSuccess", "message"]

       (compared using ==)
     # ./spec/filters/kv_spec.rb:688:in `(root)'
     # /home/travis/.rvm/gems/jruby-1.7.25/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `(root)'
  2) LogStash::Filters::KV remove_char_key/remove_char_value options : remove all characters in keys/values whatever their position key and value with leading, trailing and middle spaces should remove all spaces
     Failure/Error:
       expect(event.to_hash.keys.sort).to eq(
         ["@timestamp", "@version", "key1", "key2withspaces", "message", "tags"])

       expected: ["@timestamp", "@version", "key1", "key2withspaces", "message", "tags"]
            got: ["@timestamp", "@version", "key1", "key2withspaces", "message"]

       (compared using ==)
     # ./spec/filters/kv_spec.rb:748:in `(root)'
     # /home/travis/.rvm/gems/jruby-1.7.25/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `(root)'
  3) LogStash::Filters::KV trim_key/trim_value options : trim only leading and trailing spaces in keys/values (reported in #10) key and value with leading, trailing and middle spaces should trim only leading and trailing spaces
     Failure/Error:
       expect(event.to_hash.keys.sort).to eq(
         ["@timestamp", "@version", "key1", "key2 with spaces", "message", "tags"])

       expected: ["@timestamp", "@version", "key1", "key2 with spaces", "message", "tags"]
            got: ["@timestamp", "@version", "key1", "key2 with spaces", "message"]

       (compared using ==)
     # ./spec/filters/kv_spec.rb:718:in `(root)'
     # /home/travis/.rvm/gems/jruby-1.7.25/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `(root)'
Finished in 0.741 seconds (files took 4.63 seconds to load)
43 examples, 3 failures
Failed examples:
rspec ./spec/filters/kv_spec.rb:684 # LogStash::Filters::KV keys without values (reported in #22) key and splitters with no value should ignore the incomplete key/value pairs
rspec ./spec/filters/kv_spec.rb:744 # LogStash::Filters::KV remove_char_key/remove_char_value options : remove all characters in keys/values whatever their position key and value with leading, trailing and middle spaces should remove all spaces
rspec ./spec/filters/kv_spec.rb:714 # LogStash::Filters::KV trim_key/trim_value options : trim only leading and trailing spaces in keys/values (reported in #10) key and value with leading, trailing and middle spaces should trim only leading and trailing spaces
Randomized with seed 9365
The command "ci/build.sh" exited with 1.
cache.2
store build cache
$ bundle clean
Cleaning all the gems on your system is dangerous! If you're sure you want to remove every system gem not in this bundle, run `bundle clean --force`.
0.00s
0.81snothing changed, not updating cache
Done. Your build exited with 1.
ph commented 7 years ago

I think we had a regression somewhere when we changed some logic to optimize the tags field, I've found this PR https://github.com/elastic/logstash/pull/6559 to revert the issue back.

IIRC correctly tags field where set to an empty array, when they went through decorate.

colinsurprenant commented 7 years ago

I can reproduce locally. looking for fix.

colinsurprenant commented 7 years ago

Ok, I understand what is going on. Including the tags fields in the event when there was no tag is a bug we introduced in 5.0.1 and which was fixed in 5.2.0. I will go ahead and simply fix the specs to reflect that.

colinsurprenant commented 7 years ago

50 merged to fix this.