Skip to content
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

Plugin development enhancement #1256

Merged
merged 5 commits into from
Oct 6, 2016
Merged

Conversation

tagomoris
Copy link
Member

This change includes some small changes to enhance plugin development:

  • Fix to raise errors (including errors from wrong scripting, e.g., NameError) instead of rescue&log it
  • Add method to create a metadata for testing/validation using extract_placeholders, without adding metadata into @buffer.metadata_list
  • Fix to wait actual flushing after force_flush in test drivers

This change is based on #1255.

@tagomoris tagomoris added enhancement Feature request or improve operations v0.14 labels Oct 4, 2016
@@ -598,6 +738,13 @@ def metadata(tag, time, record)
end
end

def metadata_for_test(tag, time, record)
raise "BUG: #test_metadata is available only when no actual metadata exists" unless @buffer.metadata_list.empty?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#metadata_for_test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right.

@tagomoris tagomoris force-pushed the plugin-development-enhancement branch from 9baae94 to 01dd5c5 Compare October 5, 2016 06:43
Logged errors are very hard to find for plugin authors, especially in tests. Errors will occur very easily (e.g., scripting bug).
Normal plugin development should not use retries or secondary plugins. So there's no reason to execute rescue&retry in plguins.
@tagomoris tagomoris force-pushed the plugin-development-enhancement branch from 1872484 to 7b89fb5 Compare October 5, 2016 08:11
@tagomoris
Copy link
Member Author

@repeatedly Rebased on master, and pushed a commit to update comment.

@repeatedly
Copy link
Member

LGTM

@tagomoris tagomoris merged commit 36b547d into master Oct 6, 2016
@tagomoris tagomoris deleted the plugin-development-enhancement branch October 6, 2016 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants