fluentd icon indicating copy to clipboard operation
fluentd copied to clipboard

Detect wrong plugin naming which contains extra kind prefix

Open kenhys opened this issue 2 years ago • 5 comments

Which issue(s) this PR fixes:

Fixes N/A

Bit related issue: https://github.com/fluent-plugins-nursery/fluent-package-builder/issues/334

What this PR does / why we need it:

As a plugin naming scheme, register_xxx should not be pre-fixed with kind.

For examples, input plugin in_xxx.rb, @type xxx is specified in section. output plugin out_xxx.rb, @type xxx is specified in section.

There is a well known failure case, plugin doesn't detected because of not following above plugin naming rule.

In this PR, it checks whether prefixed plugin name is specified, then it raise an error with more informative message.

Docs Changes:

N/A

Release Note:

N/A

kenhys avatar Oct 06 '21 06:10 kenhys

I'll simplify test case.

kenhys avatar Oct 08 '21 07:10 kenhys

TODO: check plugin gemdir.

kenhys avatar Oct 26 '21 08:10 kenhys

What is the good way to detect dummy plugin? Just idea: launch fluentd with --gem-path and put dummy plugin for it. But Gem::Specification.find_all can't detect it. :thinking:

kenhys avatar Oct 27 '21 08:10 kenhys

Even though launched via assert_fluentd_fails_to_start with --gemfile, it cause an error with " error: You seem to use bundle exec already." It seems that BUNDLE_BIN_PATH checked and exit there.

kenhys avatar Nov 11 '21 06:11 kenhys

This PR has been automatically marked as stale because it has been open 90 days with no activity. Remove stale label or comment or this PR will be closed in 30 days

github-actions[bot] avatar Feb 09 '22 10:02 github-actions[bot]

I close this pull request that has been pending for a long time and has no solution for now, and not so serious even if it's not resolved.

ashie avatar Mar 07 '24 05:03 ashie