-
Notifications
You must be signed in to change notification settings - Fork 13
Only publish integration plugins that are marked as default #40
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
Conversation
In order to avoid overwriting individual plugins for releases that are capable of running integration plugins, only write doc entries for integration plugins that are marked as default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that skipping non-default integration plugins makes the most sense of our options.
I've included an alternate approach that includes a log message to stdout, which should help us when we eventually have to debug to figure out why it is getting skipped.
plugindocs.rb
Outdated
@@ -71,7 +71,7 @@ def execute | |||
# write the doc | |||
File.write(output_asciidoc, content) | |||
puts "#{plugin.canonical_name}@#{plugin.tag}: #{release_date}\n" | |||
end | |||
end unless released_plugin.only_publish_default? && !is_default_plugin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to do this skipping early instead of hiding it in a tailing unless
clause.
diff --git a/plugindocs.rb b/plugindocs.rb
index 819b287..7074fb7 100644
--- a/plugindocs.rb
+++ b/plugindocs.rb
@@ -44,6 +44,11 @@ class PluginDocs < Clamp::Command
"unreleased"
changelog_url = released_plugin.changelog_url
+ if released_plugin.type == 'integration' && !is_default_plugin
+ $stderr.puts("[repository:#{repository_name}]: Skipping non-default Integration Plugin\n")
+ next
+ end
+
released_plugin.with_embedded_plugins.each do |plugin|
$stderr.puts("#{plugin.desc}: fetching documentation\n")
content = plugin.documentation
@yaauie Thanks for the comment, and the suggestion. I've updated the PR to include your suggestion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense for now.
There is definitely nuance here as we allow non-integration plugins to get updated docs even if the versions aren't installed, which can be a bug or a feature depending on how we look at it (e.g., fubar input 1.2 ships in Logstash 7.5, fubar 1.3 with new features is released at a later date but never bundled with Logstash 7.5, but the docs will include the new features)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@yaauie Thanks for the LGTM, and I agree there are some interesting nuances that could cause confusion for users |
In order to avoid overwriting individual plugins for releases that
are capable of running integration plugins, only write doc
entries for integration plugins that are marked as default.