Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

njvrzm
Copy link
Contributor

@njvrzm njvrzm commented Jan 25, 2024

What is this feature?

This removes some core grafana imports from Cloudwatch. Also removes the cloudwatchNewRegionsHandler feature, which is obsolete.

Why do we need this feature?

This is part of decoupling cloudwatch from core grafana, #78778.

Which issue(s) does this PR fix?:
Fixes: #80899

Please check that:

  • It works as expected from a user's perspective.

@njvrzm njvrzm requested review from a team and grafanabot as code owners January 25, 2024 20:31
@njvrzm njvrzm requested review from iwysiu and sarahzinger and removed request for a team January 25, 2024 20:31
@CLAassistant
Copy link

CLAassistant commented Jan 25, 2024

CLA assistant check
All committers have signed the CLA.

@grafana-delivery-bot grafana-delivery-bot bot added this to the 10.4.x milestone Jan 25, 2024
@grafana-pr-automation grafana-pr-automation bot added type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project area/backend datasource/CloudWatch area/frontend labels Jan 25, 2024
@grafana-pr-automation grafana-pr-automation bot requested review from a team and leventebalogh and removed request for a team January 25, 2024 20:35
@njvrzm njvrzm added no-changelog Skip including change in changelog/release notes and removed add to changelog labels Jan 25, 2024
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 25, 2024 20:56
@njvrzm njvrzm requested a review from a team as a code owner January 25, 2024 21:20
@njvrzm njvrzm requested review from marefr, wbrowne and xnyo and removed request for a team January 25, 2024 21:20
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 25, 2024 21:23
Copy link
Contributor

@iwysiu iwysiu left a comment

Choose a reason for hiding this comment

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

A couple clean up comments, but nice work!
I tried shutting off the cross account querying flag, and it did successfully use the old log group picker.
I would double check (maybe in slack?) that we're ok to remove that flag before we remove it and that none of the users are having issues.

Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover comment? (And below)

Copy link
Contributor

Choose a reason for hiding this comment

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

Just as a nit, it doesn't need to be exported

Suggested change
func ContextWithFeaturesEnabled(enabled ...string) context.Context {
func contextWithFeaturesEnabled(enabled ...string) context.Context {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed! I thought it did at some point - maybe I was using it in a subpackage? - but it sure doesn't now

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're removing the toggle I don't think we need to reference it

Suggested change
it('should always return regions as an array of options now that the feature toggle has been removed', async () => {
it('should always return regions as an array of options', async () => {

Copy link
Contributor

@sarahzinger sarahzinger left a comment

Choose a reason for hiding this comment

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

Looking good! Lets just make sure the leftover comment bits are removed first!

Copy link
Contributor

Choose a reason for hiding this comment

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

this is really neat, does this mean we could have backend feature toggles in our external datasource plugins if we implemented something similar there? 👀 very nifty!

@sarahzinger
Copy link
Contributor

oh also random, but I tend to mark nearly everything in Add To Changelog. In this case in particular where we are deprecating a feature toggle I think it would be good. We haven't seen bugs come in to my knowledge, but you never know who might have turned off the feature toggle on their own on prem instance or something like that without reporting a bug. This way if something unexpected happens with Cloudwatch after an upgrade a user can quickly scan the changelog and see some possible threads to pull on to try to figure out what happened.

To that end I might change the name of this pr from Cloudwatch: remove core imports from featuremgmt to Cloudwatch: Deprecate cloudwatchNewRegionsHandler feature toggle and remove core imports from featuremgmt

@njvrzm njvrzm added add to changelog and removed no-changelog Skip including change in changelog/release notes labels Jan 27, 2024
@njvrzm njvrzm changed the title Cloudwatch: remove core imports from featuremgmt Cloudwatch: Deprecate cloudwatchNewRegionsHandler feature toggle and remove core imports from featuremgmt Jan 27, 2024
@njvrzm
Copy link
Contributor Author

njvrzm commented Jan 29, 2024

Re: removing the flag, it's the new regions handler that's being removed (just to make sure we're on the same page) and I got the 👍🏻 from @sarahzinger in slack for that.

@njvrzm njvrzm force-pushed the 80899-remove-core-imports-from-grafanapkgservicesfeaturemgmt-in-cloudwatch branch from f92e2ab to ecd3372 Compare January 29, 2024 09:40
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 29, 2024 09:45
@njvrzm njvrzm force-pushed the 80899-remove-core-imports-from-grafanapkgservicesfeaturemgmt-in-cloudwatch branch from ecd3372 to af58d84 Compare January 30, 2024 10:16
@grafana-pr-automation grafana-pr-automation bot requested review from a team and removed request for a team January 30, 2024 10:21
@njvrzm njvrzm merged commit ec4fafa into main Jan 30, 2024
@njvrzm njvrzm deleted the 80899-remove-core-imports-from-grafanapkgservicesfeaturemgmt-in-cloudwatch branch January 30, 2024 12:11
@aangelisc aangelisc modified the milestones: 10.4.x, 10.4.0 Mar 6, 2024
njvrzm added a commit to grafana/grafana-cloudwatch-datasource that referenced this pull request Apr 2, 2025
…remove core imports from featuremgmt via grafana/grafana#81310

* Remove core imports from grafana/pkg/services/featuremgmt in CloudWatch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add to changelog area/backend area/frontend datasource/CloudWatch type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove core imports from grafana/pkg/services/featuremgmt in CloudWatch

5 participants