Logstash: Plugin doc gen script pulls wrong text for plugin docs

Created on 11 Feb 2017  路  29Comments  路  Source: elastic/logstash

The script for generating the plugin docs is currently pulling in a couple of code comments instead of the description that begins at https://github.com/logstash-plugins/logstash-filter-geoip/blob/master/lib/logstash/filters/geoip.rb#L34.

Here's what it looks like in the doc (including a screen capture because Suyog might fix the doc before you see the problem).

image

The script should be resilient enough to extract the text even if there's a minor formatting snafu (like an extra line).

docs infra

Most helpful comment

elastic-heart

All 29 comments

@ph I'm seeing a similar problem here where the script takes text that's meant to be a comment: https://www.elastic.co/guide/en/logstash/5.2/plugins-inputs-http.html

image

Here's another one. But in this case, there is no description of what the plugin does. "handles disconnects" comes from a code comment, tho. :-(

image

Here's another one.

image

From https://www.elastic.co/guide/en/logstash/5.2/plugins-outputs-boundary.html, not sure if this is a problem with the doc gen or the code itself:

image

This one is pulling the license agreement and squishing it together with the description:

image

same problem exists in https://www.elastic.co/guide/en/logstash/5.2/plugins-outputs-google_cloud_storage.html

image

I'm guessing this is not the droid we're looking for:

image

image

image

image

image

image

image

image

@ph Including screen captures here for all the issues I found even tho they are likely related to the same bug. I just want to be able to verify the fix when you're done.

thanks @dedemorton checking it right now since we will push a few new artifacts.

Got it reproduced, https://github.com/logstash-plugins/logstash-codec-msgpack/blob/master/lib/logstash/codecs/msgpack.rb#L20, It seems that on some file the parser doesn't known it should have stop reading the headers.

Fixed:

elastic-heart

@dedemorton For the license in the file, I think the license content should go in the LICENSE file in the plugin repo? I think this is where it should belongs.

@dedemorton I've merged the PRs for the plugins and published the plugins.

@ph will this fix only be executed on new doc versions? Or can we also fix older versions retroactively?

@acchen97 it depends, by looking at the list at https://github.com/elastic/logstash/issues/6692#issuecomment-279849370, if they make no mention of a PR we could fix older versions with the same script.

@ph I think we should fix the older versions. For the topics that can't be fixed just by running the docgen tool again, I could tweak the asciidoc, but I only want to do that if we're sure we won't have to run the tool against those versions again.

@dedemorton Exactly, I would have preferred to not have to do it manually. :(

@dedemorton dont worry about the google plugins I have fixed it in the parser.

@dedemorton I've merged the changes to the logstash-docgen tool so on the next generation a lot of theses issues should be fixed.

I will assign this issue to you for the manual changes.

Closing because the manual changes have been made, where feasible, to the source files.

Was this page helpful?
0 / 5 - 0 ratings