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

Datasource settings: Add deprecation notice for database field #58647

Merged
merged 4 commits into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions packages/grafana-data/src/types/datasource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,10 @@ export interface DataSourceSettings<T extends DataSourceJsonData = DataSourceJso
access: string;
url: string;
user: string;
/**
* @deprecated -- use jsonData to store information related to database.
* This field should only be used by Elasticsearch and Influxdb.
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if it was asked somewhere else already, but are we planning to remove the use of this from Elasticsearch and Influxdb as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry but I don't know anything about them. Maybe @grafana/observability-logs can answer?

Copy link
Contributor

Choose a reason for hiding this comment

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

we'd like to remove the use of this from Elasticsearch, but there's nothing planned yet (i created a github-issue to track this at #59098)

Copy link
Contributor

Choose a reason for hiding this comment

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

regarding Influxdb, pinging @grafana/observability-metrics 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know of any plan to deprecate this, but it doesn't look like a huge lift to follow the plan laid out in the issue Gabor created above. I created an issue here #59115, so we don't loose track of this request.

*/
database: string;
basicAuth: boolean;
basicAuthUser: string;
Expand Down Expand Up @@ -586,6 +590,10 @@ export interface DataSourceInstanceSettings<T extends DataSourceJsonData = DataS
jsonData: T;
username?: string;
password?: string; // when access is direct, for some legacy datasources
/**
* @deprecated -- use jsonData to store information related to database.
* This field should only be used by Elasticsearch and Influxdb.
*/
database?: string;
isDefault?: boolean;
access: 'direct' | 'proxy'; // Currently we support 2 options - direct (browser) and proxy (server)
Expand Down