This is a big chang, it:
1. Moves API specs out of their special hierarchy
2. Removes the API spec spec_helper
3. Reactivates that stats command spec (that was accidentally not being
run before due to it not having _spec as a suffix
This was required to fix the preceeding commit, where we added a
before(:each) hook to the spec_helper that wasn't being picked up in
some cases due to the existence of two spec helpers and a $LOAD_PATH
that could change.
Fixes#7132
Instead of depending on the now deprecated multiline filter we use a
dummy filter that just emits events. This simplifies the test and
dramatically reduces timing issues.
I also increased the max-wait for the timer just in case
Fixes#7024Fixes#7131
The central problem with recording a mean stat is that on a non-realtime
system you can't guarantee that samples were evenly spaced out. A series
of timestamped gauges does a better job. This is what we can do in our
x-pack monitoring extension, but not something we should do in core. The
central difference is that x-pack has Elasticsearch, which can act as a
time series database. I'd prefer not to build a tsdb into logstash. That
would obviously involve a lot of complexity.
Fixes#7094.
Fixes#7105
This PR helps enable https://github.com/elastic/logstash/issues/7076
This also fixes a bug where when concatenating pipelines for PipelineIR
the to_s versions of the SourceWithMetadata objects were conjoined
instead of just the `text`.
Fixes#7079
The failure:
Failures:
1) LogStash::Pipeline defaulting the pipeline workers based on thread safety when there are threadsafe filters only starts multiple filter threads
Failure/Error: expect(pipeline.worker_threads.size).to eq(worker_thread_count)
expected: 5
got: 8
Related issues: #6855, #6245, #6355Fixes#7071
This is a temporary change until we have LIR execution. This allows the
LIR Pipeline object to be the only object passed into the ruby Pipeline.
The ruby Pipeline needs the source to parse the file into the legacy AST
format.
Fixes#7055
* Introduce a DeadLetterQueueFactory
DeadLetterQueueFactory is a static class that keeps
a static collection of DeadLetterQueueWriteManagers per
pipeline that has plugins requesting to use it.
* DeadLetterQueue was added as a first-class field in the execution context that input/filter/output plugins can leverage
this means the configuration read from path.config (-f) is no longer auto completed with stdin/stdout if the input/output sections are missing. This behaviour will only occur with config.string (-e).
This cleans up the code from a design patterns standpoint and makes testing plugins easier since you can just create/destroy agents at will.
Without this change the SOURCE_LOADER singleton's state will become dirty as agents are created/destroyed and be problematic.
Fixes#7048
If you use 6.0.0-alpha1, rubygems will change it to 6.0.0.pre.alpha1,
this commit changes the behavior to normalize the version before saving
it to disk.
Fixes#7008
The current implementation of the test was using a mock and an expect
on the internal classes to determine when to start testing on the
metrics. I've rewrote the setup of the test to use the file output instead of using a
instance. I believe the previous code was not completely threadsafe and was causing this error
in the spec. We should really remove any mock of the form expect_any_instance_of`.
Ref: #6935Fixes#6956
Instead of using a concrete class use let statement instead, this make
sure they are reset between run and make the variable available at the
context level.
Fixes#7017
When the fetch is call we are aggregating all the pipeline_config from
the different sources, if we encounter duplicates ids we will return a
failure, making the pipeline skip that fetch.
Fixes#6866
This expose some of the internal of the registry to the outside world to
allow other part of the system to retrieves plugins.
This change was motivated by #6851 to retrieve the installed list of
modules.
Fixes#7011
fix Issue #6352
On Windows, Logstash can't find log4j2.properties file with above message at startup.
```
Could not find log4j2 configuration at path /LS_HOME/config/log4j2.properties.
```
Fixes#6903
This unifies the two different config classes that represented mainly
the same data. While this does expose a plain java class into ruby
this works fine because ruby only needs to access and set values, not
work with ruby return types.
Fixes#7003Fixes#7004
This commit is to provide more information when an action fails and will
allow us hopefully to debug a random failure in the test suite for the
environment variable.
ref: #6978Fixes#6982
The test was actually starting an agent with pipeline and the runner has
currently no was to stop the agent. This commit make sure we use an
agent mock instead.
Fix: #6931Fixes#6957
This test has been a bit flaky since it relies on an external thread to
trigger, this commit add a bit more time for the trigger to happen and
also add a retry.
Fixes: #6929Fixes#6945