-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Plugins: Add hide_angular_deprecation setting #79296
Plugins: Add hide_angular_deprecation setting #79296
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main advantage of the new method is that it is possible to set the value via environment variables
Hmm that should be possible with the other method as well 🤔 But there's a function needed to be call or something to populate from env.
The function that overrides config from env vars is the following: grafana/pkg/setting/setting.go Lines 685 to 700 in 05dcc7a
Used here: grafana/pkg/setting/setting.go Lines 915 to 919 in 05dcc7a
It uses the
There's also grafana/pkg/setting/setting.go Lines 1397 to 1417 in ea36336
But it requires to state the section name, like this: cfg.SectionWithEnvOverrides("section_name").Key("some_key").MustBool(false) and we have one section per plugin ID, and it gets more complicated/confusing in my opinion as we also have the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I guess it's worth mentioning that on a previous conversation, we agreed on only putting configuration relevant to the plugin code under the As @xnyo mentions, there is a bug / missing feature that prevents from mapping env vars to plugin specific config. I think we should create an issue to track that since it may be necessary for some other config. Do you mind opening that with your finds @xnyo ? |
Will do :) |
I'm pretty sure we used to support that when I introduced support for plugin config, #23451. So yes, the reason is probably we nowadays do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What is this feature?
This PR adds an
hide_angular_deprecation
to[plugins]
config section. This is a comma-separated list that acts the same as specifying thehide_angular_deprecation
plugin setting.This (new):
Is the same as this (old):
This PR also removes the old way of setting the
hide_angular_deprecation
flag (via plugin settings). This was introduced in #77026 targeting 10.3.x so it's unreleased.Why do we need this feature?
The main advantage of the new method is that it is possible to set the value via environment variables:
Who is this feature for?
Grafana users.
Which issue(s) does this PR fix?:
Fixes #
Special notes for your reviewer:
Please check that: