Conversation
🤖 GitHub commentsJust comment with:
|
|
This pull request does not have a backport label. Could you fix it @andrewvc? 🙏
|
| # Outputs that never declared a concurrency strategy used the now-removed :legacy | ||
| # strategy, which accepted a `workers` setting. Strip it so existing configs with | ||
| # `workers => 1` don't blow up. | ||
| if !self.class.instance_variable_defined?(:@concurrency) && @params.delete("workers") |
There was a problem hiding this comment.
I was on the fence about adding a new @concurrency_explicit boolean to detect this, glad to switch to that approach if reviewers find this pragile.
There was a problem hiding this comment.
I would find it simpler to just use the :deprecated => "Extra text for deprecation log" facility already supported by the config mixin.
| # Outputs that never declared a concurrency strategy used the now-removed :legacy | ||
| # strategy, which accepted a `workers` setting. Strip it so existing configs with | ||
| # `workers => 1` don't blow up. | ||
| if !self.class.instance_variable_defined?(:@concurrency) && @params.delete("workers") |
There was a problem hiding this comment.
I would find it simpler to just use the :deprecated => "Extra text for deprecation log" facility already supported by the config mixin.
| # strategy, which accepted a `workers` setting. Strip it so existing configs with | ||
| # `workers => 1` don't blow up. | ||
| if !self.class.instance_variable_defined?(:@concurrency) && @params.delete("workers") | ||
| self.logger.warn("Output plugin #{self.class.name}: the `workers` setting is no longer used and will be removed in a future release.") |
There was a problem hiding this comment.
if we do our own logging, we should use the deprecation_logger#deprecated() so that it goes to the deprecation log.
| it "should instantiate cleanly" do | ||
| params = { "dummy_option" => "potatoes", "codec" => "json", "workers" => 2 } | ||
| worker_params = params.dup; worker_params["workers"] = 1 | ||
| params = { "dummy_option" => "potatoes", "codec" => "json" } |
There was a problem hiding this comment.
here's a bug that pre-existed your change: the params local variable is assigned but not used.
|
@yaauie thanks for the review, I've incorporated all your fixes, should be ready for review again. |
|
/run exhaustive tests |
|
run exhaustive tests |
kaisecheng
left a comment
There was a problem hiding this comment.
LGTM. The red CI is unrelated to this change
yaauie
left a comment
There was a problem hiding this comment.
I think that the general approach makes sense. I have a couple comments on finding a path forward that gives users more-meaningful info if/when they hit the issue.
Add rye's suggestion for improved error message for legacy concurrency plugins Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Use inspect in the corner case of missing `config_name` Co-authored-by: Rye Biesemeyer <yaauie@users.noreply.github.com>
Release notes
The default
legacyoutput strategy is now removed. This should cause no user-facing issues.What does this PR do?
Removes the
legacyoutput strategy, which used the ancient and long deprecated multi-worker concurrency queue with a per-output queue / threadpool. See #18971 for more detail / analysis.There is a small non-breaking change in behavior, now when users declare
workers => 2or greater values instead of an exception being thrown they only get a warning. This should not be considered a breaking change since this is something no one could rightly be imagined to depend on.Why is it important/What is the impact to the user?
Code simplification / cleanup.
Checklist
Author's Checklist
workerssetting produces no effectHow to test this PR locally
Confirm the commands / output below
Related issues
Fixes #18971