A doc generator implementation for aliased plugin.#68
Merged
mashhurs merged 9 commits intoelastic:mainfrom Apr 25, 2022
mashhurs:aliased-plugin-doc-generator
Merged
A doc generator implementation for aliased plugin.#68mashhurs merged 9 commits intoelastic:mainfrom mashhurs:aliased-plugin-doc-generator
mashhurs merged 9 commits intoelastic:mainfrom
mashhurs:aliased-plugin-doc-generator
Conversation
mashhurs
commented
Mar 24, 2022
mashhurs
commented
Mar 24, 2022
36 tasks
yaauie
reviewed
Apr 1, 2022
Contributor
Author
|
I will update this PR once dependant PR is merged: dependant PR |
yaauie
reviewed
Apr 18, 2022
Member
yaauie
left a comment
There was a problem hiding this comment.
Hey @mashhurs fantastic work.
I've left a couple nitpicks, a suggestion to pull some of the reindexing up into the new Alias utility, and some thoughts about simplifying the intermediate alias definition index format so that we didn't have to deal with so many complexities of nesting.
yaauie
reviewed
Apr 21, 2022
Member
yaauie
left a comment
There was a problem hiding this comment.
Certainly getting close. Everything I have left is pretty minor:
My comments fit into 5 categories:
- alias plugin equivalence
- copy/paste artifacts from wrapped plugin implementation remain in alias plugin
- failing early by using
Hash#fetchfor required values - ruby-ism: avoiding explicit
return(except in guard clauses) - ruby-ism: module methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A doc generator for alias plugins.
Description
This change automates manual job to create a doc for aliased plugins such as beats. We don't see the potential use cases to generate versioned docs for alias plugins, so lgic will be integrated into reference doc generator.
Usage
Install the bundle
bundle install --path=vendor/bundleRun generator
bundle exec ruby plugindocs.rb --output-path ../logstash-docs ../logstash/plugins_version_docs.jsonNote that, I have locally pulled
logstashrepo and runplugins_version_docs.jsongenerator gradle job before running this command.Test
beats.asciidoc, run following command and see if it generateselastic_agent.asciidocfile.bundle exec ruby plugindocs.rb --output-path ../logstash-docs ../logstash/plugins_version_docs.jsonversioned_plugins.rbscript to make sure this change does not block existing jobs.bundle exec ruby versioned_plugins.rb --repair --skip-existing --dry-run --output-path=../(don't forget setting your
GITHUB_TOKENin env if running multiple times)