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

Clarify README docs for template_name and templates #1043

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

sparrowt
Copy link
Contributor

@sparrowt sparrowt commented Jan 5, 2024

Clarify when the index template is created and what 'hash' means (this was not at all obvious to me as a newcomber to Ruby - not all fluentd users will know Ruby)

I expect none of the below are really relevant as it is a readme-only change?

(check all that apply)

  • tests added
  • tests passing
  • README updated (if needed)
  • README Table of Contents updated (if needed)
  • History.md and version in gemspec are untouched
  • backward compatible
  • feature works in elasticsearch_dynamic (not required but recommended)

Clarify when the index template is created and what 'hash' means (this was not at all obvious to me as a newcomber to Ruby - not all fluentd users will know Ruby)
README.md Outdated
@@ -541,7 +541,7 @@ The path to the file containing the template to install.

### templates

Specify index templates in form of hash. Can contain multiple templates.
Specify index templates (to be created on startup) in the form of a Ruby hash (accepts JSON dict). Can contain multiple templates.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hash should be obvious for HashMap for normal Rubyists. We should revert this part.

Copy link
Contributor Author

@sparrowt sparrowt Jan 15, 2024

Choose a reason for hiding this comment

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

I came to this documentation as a user of fluentd (and this plugin) without having any Ruby experience - personally I wouldn't expect someone using (not developing) something written in language X to necessarily know about language X, what do you think?

And even once I eventually realised that 'hash' needed interpreting in the context of ruby it still wasn't obvious to me that a JSON dict string was the appropriate form to provide.

Copy link
Collaborator

@cosmo0920 cosmo0920 Jan 16, 2024

Choose a reason for hiding this comment

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

Even if newbie for Ruby and Fluentd, I didn't accept your proposed change. Because hash should be used in everywhere for Ruby world. So, I would like to insist revert that part.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok I will remove the word "Ruby" and leave it just as "hash" - I think the other changes on this line (clarifying when it is created, and what format it is in) are valuable so before I push more commits, are you happy with this?

Specify index templates (to be created on startup) in the form of a hash (accepts JSON dict). Can contain multiple templates.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. I love to use your suggestion. 😉

@@ -527,7 +527,7 @@ into same document with data1 as wanted and duplicated document is avoided.

### template_name

The name of the template to define. If a template by the name given is already present, it will be left unchanged, unless [template_overwrite](#template_overwrite) is set, in which case the template will be updated.
The name of the index template to create on fluentd startup. If a template by the name given is already present, it will be left unchanged, unless [template_overwrite](#template_overwrite) is set, in which case the template will be updated.
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

README.md Outdated
@@ -541,7 +541,7 @@ The path to the file containing the template to install.

### templates

Specify index templates in form of hash. Can contain multiple templates.
Specify index templates (to be created on startup) in the form of a Ruby hash (accepts JSON dict). Can contain multiple templates.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. I love to use your suggestion. 😉

@cosmo0920 cosmo0920 self-requested a review January 20, 2024 05:42
@sparrowt
Copy link
Contributor Author

Hopefully this is now ok @cosmo0920

@cosmo0920 cosmo0920 merged commit 0d24bb6 into uken:master Jan 23, 2024
9 checks passed
@cosmo0920
Copy link
Collaborator

Noted. Thank you!

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

Successfully merging this pull request may close these issues.

2 participants