Skip to content

Support for Logstash plugins (WIP) #211

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

Open
karenzone opened this issue Jan 15, 2025 · 2 comments
Open

Support for Logstash plugins (WIP) #211

karenzone opened this issue Jan 15, 2025 · 2 comments

Comments

@karenzone
Copy link
Contributor

karenzone commented Jan 15, 2025

WIP - Add content from Slack convo with @Mpdreamz and @karenzone (with some bonus content for context)

Topic: Questions and concerns about migrating Logstash plugin docs

  • Plugin doc source files. Logstash plugin docs live in 200+ repos in the logstash-plugins github org--not the elastic github org. (This causes problems with github automation.)

  • Validation. There's no Buildkite validation or linting on Logstash plugin doc source files. Problems don't manifest until after a docs PR has been merged in the plugin repo, the gem published to rubygems.org, the version tag pushed to the repo, the plugin docs generated (for either the Logstash Reference[1] or the Logstash Versioned Plugin Reference[2]), and changes staged in a PR[3] in the logstash-docs repo.

    • When the PR is created in logstash-docs, BuildKite validation checks it. Fortunately, we know not to merge a PR that doesn't pass CI. However, the bad docs are tied to the plugin version tag, and we have to make the fix in the source file, bump the version, publish to rubygems.org again, and make fixes in generated content that's already out there.
  • Plugin doc source files are templates[4]. That is, they are not fully functional docs. We have docs tooling[5][6] that populates variables and does some transformation so that we have different output from the same content for the Logstash Reference and the Versioned Plugin Reference.

  • Plugin doc headers.

    • @Mpdreamz: "In docs V3 we don't support referencing files outside the current doc set.
      e.g include::{include_path}/plugin_header.asciidoc[] which resolves to ../../../../logstash/docs/include/plugin_header.asciidoc"
    • @karenzone: This was raised as an issue in a previous migration discussion (for docsmobile maybe?) and we determined that this approach would be permissible. Sounds like we need to revisit and rethink possible workaround.
    • Spitballing here, but we might be able to work around this issue if we make the stack versioned plugins that are currently included in the Logstash Reference a stand-alone doc built out of the logstash-docs repo. But that approach is not without its own complexities that we'll need to consider.
  • Logstash plugins in IA.

  • Impact of versioning changes.

    • Question from @lcawl (paraphrased): "What's the impact of the new versioning strategy on stack-versioned plugin presentation?"
    • @karenzone: TBD. Seems like users will always need to know which plugin versions are compatible with a Logstash core version. (Note that matching plugin/stack versions is a rough approximation controlled by the Gemfile.jruby-3.1.lock.release file that we generate at feature freeze.)

References

[1] Logstash Reference (LSR).
"I'm running Logstash 8.17. What plugin versions are compatible with this version of Logstash? What versions of default plugins are installed with Logstash by default?"
[2] Logstash Versioned Plugin Reference.
"I'm using logstash-output-elasticsearch v11.22.8. What config options are available to me?"
[3] Sample logstash-docs PRs:

[4] Sample plugin source doc: https://github.com/logstash-plugins/logstash-output-elasticsearch/blob/main/docs/index.asciidoc?plain=1

[5] Logstash Reference (LSR) docgen: https://github.com/elastic/docs-tools/blob/master/plugindocs.rb
[6] Versioned Plugin Reference (VPR) docgen: https://github.com/elastic/docs-tools/blob/master/versioned_plugins.rb

Previous considerations and related issues

@karenzone
Copy link
Contributor Author

cc:/ @robbavey

@karenzone
Copy link
Contributor Author

@karenzone Note to self: https://github.com/elastic/logstash-filter-elastic_integration docs are also an outlier from a docgen PoV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant