Giter VIP home page Giter VIP logo

Comments (9)

wiibaa avatar wiibaa commented on August 20, 2024

Investigating the cases 41 and 42
For me, on Windows, the WORD definition was overriden by a pattern file in the logstash gem
jruby-1.7.17\lib\ruby\gems\shared\bundler\gems\logstash-2331739bb57e\patterns
as seen in the debug log

←[32mAdding pattern {"WORD"=>"\\b[2-5]\\b", :level=>:info, :file=>"/dev/tools/jruby-1.7.17/lib/ruby/gems/shared/gems/jls-grok-0.11.0/lib/grok-pure.rb", :line=>"62", :method=>"add_pattern"}←[0m

This file remains around because test creating it is failing too, see 46).
https://github.com/logstash-plugins/logstash-filter-grok/blob/master/spec/filters/grok_spec.rb#L671-L696
Any idea how to enforce the cleanup in rspec and reduce such side-effect?

from logstash-filter-grok.

wiibaa avatar wiibaa commented on August 20, 2024

In fact after removing the two last tests implying tempfiles and cleaning the pattern dirs in the gem, the full spec is reliably OK. So it is more an issue about running the spec on windows without tempfile side-effect than a bug in grok itself.

from logstash-filter-grok.

ph avatar ph commented on August 20, 2024

@wiibaa thx for the investigation. 👍 :)

from logstash-filter-grok.

ph avatar ph commented on August 20, 2024

Fixed in:
jordansissel/ruby-grok#16
#10

from logstash-filter-grok.

jsvd avatar jsvd commented on August 20, 2024

In my windows box I edited the installed grok-pure lib to ensure closing the file and then pulled pr/10 but I still get 9 failures: https://gist.github.com/jsvd/084f7fcd27508797923b

did I miss some other patch?

from logstash-filter-grok.

ph avatar ph commented on August 20, 2024

@jsvd you should have all the patch for this bug? I suggest you remove the gems reinstall them and use the patch. I think you may have some left over files when the tests had side effects.

from logstash-filter-grok.

jsvd avatar jsvd commented on August 20, 2024

I still get this issue after cloning logstash master, applying this PR and the ruby-grok patch manually.
https://gist.github.com/jsvd/51a8111a7d6ba3365868

from logstash-filter-grok.

jsvd avatar jsvd commented on August 20, 2024

Confirmed that manually deleting patterns in the patterns\ dir, applying the ruby-grok patch and this patch makes the tests pass inside logstash.
Maybe the test files should be generated in a temporary directory instead of patterns\?
Otherwise LGTM

from logstash-filter-grok.

ph avatar ph commented on August 20, 2024

This is more like an integration test to make sure we can override the pattern in the pattern dir, the other files are generated in a tmp folder.

IMHO, We should revisit all the test examples of the grok filter to refactor them and to use Stud::Temporary

from logstash-filter-grok.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.