Emit deprecation warning when deprecated log flags used in adapter #7312
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If you'd rather not have the noise here, I can just carry this downstream but I thought I'd at least offer 😄
I'm trying to prevent any user surprise from the log migration
We migrated to zap logs in the metrics adapter over in Reintroduce PR #5974: Remove klogr dependency and move to zap #6578 , and as part of that we translated the old log args to zap args, which avoids hard breaking users, but which will potentially also result in users having their log output change.
This just emits explicit log messages when using the old log flags explaining that the old log flags were deprecated so folks who are concerned can see why at the top of their logs.
Over in the olm operator we have that kedacontroller object that governs KEDA deployment and allows overriding args, Kedacontrollers persist across upgrades, and rather than rewrite the user's override args to be proper on the kedacontroller (and upset gitops systems since that's a user-set field) we thought it more straightforward to just signal it here since this is where they would look -- in the log whose output was different.
Checklist
[ ] When introducing a new scaler, I agree with the scaling governance policy[ ] Tests have been addedmake generate-scalers-schemahas been run to update any outdated generated files.[ ] Changelog has been updated and is aligned with our changelog requirements[ ] A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)[ ] A PR is opened to update the documentation on (repo) (if applicable)Fixes #
Relates to #