-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi pipeline and pipeline-to-pipeline communication support #93
Comments
Interesting idea! So I guess there are three reasons for doing the pipeline wrapping:
I hope we can do this in a backwards-compatible manner. |
@magnusbaeck you got this exactly right. About the backwards compatibility: I guess as part of the cleanup and with the introduction with this and the other features (daemon mode #94, and coverage #95), we will raise the bar in regards to the supported version of Logstash anyways. If we head for a version 2.0, the question would be, what would be the minimal version of Logstash that we need to support. Already now we have some sections in the code base of LFV, that take care of different version of Logstash (e.g. at some point the possibility to pass filter configs to logstash via flags have been dropped and a workaround needed to be found an implemented). Over all I guess, the code readability as well as the maintainability will benefit from dropping support for (very) old versions of Logstash. |
You're probably right about the backwards compatibility. It's totally reasonable to only support, say, Logstash 6+ for LFV 2.x. If there are important bugfixes or small features that motivate backporting to 1.x that could always be done on a separate branch. Or if the 2.x stuff should be on a separate branch. I'll have to read up on how Go modules work in this regard. Another LFV 2.x feature could be to change the package structure so that not all packages (maybe none?) are public. |
If we decide to move most (or even all) of the packages into |
This is somewhat confusing. Go Modules: v2 and Beyond says
and the go command documentation says
so it seems we have to choice but to introduce a v2 subdirectory and move almost everything there, i.e. we'd end up with something like this:
But after reading https://therootcompany.com/blog/bump-go-package-to-v2/ I realize that it's only the module path, i.e. the |
@magnusbaeck What is you conclusion on this topic? Do you still plan to move all the existing packages into |
Yes, I plan to make the changes outlined above except skipping the v2 directory and just updating the module path. I haven't tested it. I got stuck reworking the tests for the testcase package but that took longer than expected. I'll pause that work and migrate the package structure instead. I should have time for that tomorrow night. |
This looks excellent - I'm trying to get multi-pipelines to work with the Beta but I'm not seeing any logging that can be used for debugging here. Maybe this is a case for adding some more logging? The first issue I think I had is that my pipelines.yml has
which exited with: Playing around a bit I think I need this format:
Which seems like a minor bug in LFV if it doesn't accept pipeline paths without wildcards I now get: So now it is not picking up any of my tests and I'm still trying to debug at the moment. More logging here would be extremely useful in this case! I'm going to try simplifying my test cases and seeing where I get with this. |
Looks like if there is a dash in the pipeline.id then it does not work: If I set the pipeline.id as follows then it works fine:
But if I change this to
Then the daemon run command returns:
and the daemon start command logs the following:
|
Solves issue mentioned in: magnusbaeck#93 (comment)
Solves issue mentioned in: magnusbaeck#93 (comment)
Hi @jgough Thanks for your feedback. I have fixed the issues "dash in In order to get more debug information consider the following two options when you start the daemon:
I hope this is of help for your future debugging. |
Thanks for the advice and for the fixes, that is extremely helpful. Am getting much closer to getting this working now. Looks like dashes in plugin ids are also not working? but changing the id to |
* Fix pipeline.id with dash * Fix path.config pointing to dir in pipelines.yml Solves issue mentioned in: #93 (comment)
Resolve issue mentioned in magnusbaeck#93 (comment)
Since Logstash version 6.0 there is support added for multiple pipelines. Running multiple pipelines allows users to isolate data flow and helps simplify complex configurations. At the moment there is no good way to test Logstash configurations with multiple pipelines in Logstash Filter Verifier (LFV), especially if the pipeline-to-pipeline communication (available since Logstash version 6.3) is used.
The idea of this issue is to discuss, how LFV could be extended such that Logstash configurations with multiple pipelines as well as pipeline-to-pipeline communication could be tested.
The addition of the support of pipeline-to-pipeline communication would also allow LFV to better wrap around the Logstash configuration under test. The flow could go like this:
@timestamp
field, for test szenarios this is not suitable and it would be beneficial, if a deterministic fake time could be provided)@metadata
field, built in support for metadata fields #5)The advantage of this would be, that without more modifications to the Logstash configuration (config under test) than today (change inputs and outputs), LFV would be able to adopt to changes to the test suite by only changing the filtering part of the Logstash configuration (because some of the input plugins prevent the reload of the Logstash configuration).
Additionally, the wrapping with pipeline-to-pipeline communication would also allow to send LFV specific controll messages to logstash, which are then received again by LFV. These could signal the start or the end of a test suite run and with this make the whole process more reliable.
The text was updated successfully, but these errors were encountered: