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

Upgrade sdk and use latest grafana UI #18

Merged
merged 5 commits into from
Mar 31, 2021

Conversation

sunker
Copy link
Contributor

@sunker sunker commented Mar 30, 2021

! Do not merge before grafana 7.5.2 is released and the pre-released for grafana packages are replaced by real version numbers from npm !

This text is copied from this pr in grafana

What this PR does / why we need it:

This PR upgrades the golang sigv4 package. The new version of the package has support for:

It also replaces the custom SigV4 react component that was rendered in DataSourceHttpSettings with the ConnectionConfig from the @grafana/aws-sdk npm package. The ConnectionConfig component is already being used as ConfigEditor for CloudWatch, IoT Sitewise, Timestream and the X-ray plugin.

The changes in the @grafana/aws-sdk has been kept to a minimum since it's already been tested and is used by other plugins. A few minor things have been added though:

  • the possibility to opt out on the component header (since SigV4 needs to have different header text and styles than for example CloudWatch)
  • the possibility to opt out on the Endpoint field (since it's not needed for SigV4)
  • removed dependency to grafana/runtime since config can be retrieved from grafana boot data
  • unit tests

**Special notes for your review
Do not merge before grafana 7.5.2 is released and the pre-released for grafana packages are replaced by real version numbers from npm

@alexanderzobnin alexanderzobnin self-requested a review March 30, 2021 12:01
package.json Outdated
"@grafana/data": "7.5.0-pre.0-f0d6f132ae",
"@grafana/runtime": "7.5.0-pre.0-f0d6f132ae",
"@grafana/toolkit": "7.5.0-pre.0-f0d6f132ae",
"@grafana/ui": "7.5.0-pre.0-f0d6f132ae",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

7.5.0-pre.0-x are pre-releases. If you get a 401 when running yarn, follow this instruction.

However, the pre-releases are just for testing. As soon as grafana 7.5.2 is released, we should point to those instead. @grafana/aws-sdk should be using 0.0.3.

} from '@grafana/data';
import LanguageProvider from './language_provider';
import { ElasticResponse } from './elastic_response';
import { IndexPattern, getDefaultTimeRange } from './index_pattern';
import { ElasticQueryBuilder } from './query_builder';
import { toUtc } from '@grafana/data';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

got a build error so refactored this. please verify is looks ok

@@ -2,6 +2,7 @@ import { DataSourceSettings } from '@grafana/data';

export function createDatasourceSettings<T>(jsonData: T): DataSourceSettings<T> {
return {
typeName: '',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

consequence of grafana/data update a think

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.

Tested and LGTM

@alexanderzobnin alexanderzobnin marked this pull request as ready for review March 31, 2021 08:48
@alexanderzobnin alexanderzobnin merged commit 0d637db into master Mar 31, 2021
@Elfo404 Elfo404 deleted the upgrade-sdk-and-use-latest-grafana-ui branch April 14, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants