Skip to content
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: Remove secure socks proxy feature toggle #66611

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

stephaniehingtgen
Copy link
Contributor

What is this feature?

This PR removes the feature toggle secureSocksDSProxyEnabled, which was added in this PR. This will still not be enabled unless it is enabled in the config.ini, via secure_socks_datasource_proxy.enabled.

It also cleans up repeated UI code by moving the toggle to the DataSourceHttpSettings, if the feature is enabled on the instance. This is not available for the alertmanager, so it is false for that datasource.

Which issue(s) does this PR fix?:

Fixes https://github.com/grafana/hosted-grafana/issues/3764

Special notes for your reviewer:

@stephaniehingtgen stephaniehingtgen added this to the 10.0.0 milestone Apr 14, 2023
@stephaniehingtgen stephaniehingtgen self-assigned this Apr 14, 2023
@stephaniehingtgen stephaniehingtgen requested review from a team as code owners April 14, 2023 18:02
@stephaniehingtgen stephaniehingtgen requested a review from a team April 14, 2023 18:02
@stephaniehingtgen stephaniehingtgen requested review from asimpson, bossinc, codeincarnate, oscarkilhed, sakjur, papagian and yangkb09 and removed request for a team April 14, 2023 18:02
@stephaniehingtgen stephaniehingtgen changed the title Remove secure socks proxy feature toggle Plugins: Remove secure socks proxy feature toggle Apr 14, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

⚠️   Possible breaking changes

(Open the links below in a new tab to go to the correct steps)

grafana-data has possible breaking changes (more info)

Console output
Read our guideline

@grafanabot grafanabot added the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Apr 14, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

Backend code coverage report for PR #66611

Plugin Main PR Difference
cloudwatch 82.6% 82.6% 0%

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

Frontend code coverage report for PR #66611

Plugin Main PR Difference
azuremonitor 82.91% 82.91% 0%
cloud-monitoring 72.73% 72.73% 0%
cloudwatch 83.03% 83.03% 0%

Copy link
Member

@wbrowne wbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@marefr marefr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some questions/comments

@@ -308,6 +310,7 @@ export const DataSourceHttpSettings = (props: HttpSettingsProps) => {
<CustomHeadersSettings dataSourceConfig={dataSourceConfig} onChange={onChange} />
)}
</>
{secureSocksDSProxyEnabled && <SecureSocksProxySettings options={dataSourceConfig} onOptionsChange={onChange} />}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In regards to external plugins there's possibly a problem I see with this approach, but maybe external plugins is not a concern for now? If a plugin author would provide secureSocksDSProxyEnabled=true to the DataSourceHttpSettings component it would always render even if the secure socks configuration is not enabled in Grafana config, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct ☝🏻 But I don't think this is a blocker. We should probably try to break this UI into smaller components in the future which might mitigate this problem.

Copy link
Contributor

@aangelisc aangelisc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@mckn mckn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -308,6 +310,7 @@ export const DataSourceHttpSettings = (props: HttpSettingsProps) => {
<CustomHeadersSettings dataSourceConfig={dataSourceConfig} onChange={onChange} />
)}
</>
{secureSocksDSProxyEnabled && <SecureSocksProxySettings options={dataSourceConfig} onOptionsChange={onChange} />}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct ☝🏻 But I don't think this is a blocker. We should probably try to break this UI into smaller components in the future which might mitigate this problem.

@stephaniehingtgen stephaniehingtgen removed the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Apr 18, 2023
@grafanabot grafanabot added the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Apr 18, 2023
@stephaniehingtgen stephaniehingtgen removed the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Apr 18, 2023
@stephaniehingtgen stephaniehingtgen merged commit 255d8f3 into main Apr 18, 2023
21 of 22 checks passed
@stephaniehingtgen stephaniehingtgen deleted the secure-socks-remove-feature-toggle branch April 18, 2023 17:11
@zerok zerok modified the milestones: 10.0.0, 10.0.0-preview May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants