Repository navigation
root_agent: drop the unused require 'delegate' - #5712
Conversation
The require came in with the Label feature (6b37daa), but nothing in fluentd uses Delegator, SimpleDelegator or DelegateClass, in root_agent.rb or anywhere else under lib/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Akira Matsuda <ronnie@dio.jp>
Watson1978
left a comment
There was a problem hiding this comment.
Thanks for removing the unused require. Approved as is.
Nothing under lib/ uses Delegator, SimpleDelegator or DelegateClass now. The last user, RootAgentProxyWithoutErrorCollector, was removed in 8d9bd84.
A compatibility note for the record. fluent-plugin-mutate_filter 1.0.7 uses SimpleDelegator without requiring delegate. In a normal setup, tzinfo loads delegate anyway, so nothing changes. tzinfo 2.x loads it through concurrent-ruby. tzinfo 1.1 and 1.2 load it through thread_safe 0.1.1 or later.
Older dependency sets do not load it. Examples are tzinfo 1.0.x, or tzinfo 1.1 or 1.2 with thread_safe 0.1.0. Our gemspec still allows them. With them, loading the plugin after fluent/engine or fluent/test now fails with uninitialized constant Fluent::Plugin::Mixin::SimpleDelegator (NameError). For example, fluent-plugin-config-format -f txt filter mutate and the plugin's tests fail. The fluentd command still works, because fluent/supervisor loads delegate through webrick and tempfile.
These versions are from 2012 and 2013, so I don't think we need to keep the require for them. If it ever matters, the plugin should require delegate itself.
Which issue(s) this PR fixes:
None.
What this PR does / why we need it:
Removes
require 'delegate'fromlib/fluent/root_agent.rb. The require came in with the Label feature (6b37daa), but nothing in fluentd usesDelegator,SimpleDelegatororDelegateClass, inroot_agent.rbor anywhere else underlib/.test/test_root_agent.rbpasses without it (45 tests, 0 failures).Docs Changes:
Not needed.
Release Note:
Not needed.
🤖 Generated with Claude Code