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

Dataplane: Deprecate timeseries-many in favor of timeseries-multi #59070

Merged
merged 5 commits into from Dec 1, 2022

Conversation

bohandley
Copy link
Contributor

What is this feature?
This work is to deprecate the dataframe type timeseries-many for timeseries-multi.

Why do we need this feature?
This work is needed for grafana/grafana-plugin-sdk-go#560 so that the frontend works with the new type.

Who is this feature for?
This feature is for the dataplane project.

Special notes for your reviewer:
This is a first try at deprecating timeseries-many, so any suggestions to get this working are appreciated!

@bohandley bohandley added add to changelog area/dataframe no-backport Skip backport of PR area/dataplane Dataplane Project (Data type contract) labels Nov 21, 2022
@bohandley bohandley added this to the 9.4.0 milestone Nov 21, 2022
@bohandley bohandley self-assigned this Nov 21, 2022
@bohandley bohandley requested review from a team as code owners November 21, 2022 20:00
@bohandley bohandley requested a review from a team November 21, 2022 20:00
@bohandley bohandley requested review from a team as code owners November 21, 2022 20:00
@bohandley bohandley requested review from joshhunt, JoaoSilvaGrafana, mckn, oscarkilhed and supilee and removed request for a team November 21, 2022 20:00
@@ -7,7 +7,7 @@
export enum DataFrameType {
TimeSeriesWide = 'timeseries-wide',
TimeSeriesLong = 'timeseries-long',
TimeSeriesMany = 'timeseries-many',
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a breaking change in our public (typescript) API?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a good question! @kylebrandt @ryantxu Is this supposed to be a breaking change or not? We need to consider the typescript API as Josh mentioned.

Copy link
Contributor

Choose a reason for hiding this comment

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

what is and isn't a breaking changes for plugins is tricky to define for the frontend. Typescript is not a runtime concern, so this will not break any existing plugins from running. But it could prevent them from being built.

From the outside, a simple way out would be to actually deprecate (rather than remove) the enum value with @deprecated jsdoc annotation, and then remove in grafana 10.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup deprecating not removing

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add something to point to the replacement, e.g. "use TimeSeriesMulti instead", or "@deprecated in favor of TimeSeriesMulti"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I updated the text @kylebrandt

@grafanabot
Copy link
Contributor

@grafanabot grafanabot added the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Nov 21, 2022
@grafanabot grafanabot removed the levitate breaking change A label indicating a breaking change and assigned by Levitate. label Nov 21, 2022
@grafanabot
Copy link
Contributor

Copy link
Contributor

@gtk-grafana gtk-grafana left a comment

Choose a reason for hiding this comment

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

LGTM! usage shows as deprecated in my IDE
image

Copy link
Member

@academo academo 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!

@ryantxu
Copy link
Member

ryantxu commented Dec 1, 2022

This is fine... but we could/should likely update alll the frontend references to use multi

I think this: https://github.com/grafana/grafana/blob/main/public/app/features/transformers/prepareTimeSeries/prepareTimeSeries.ts#L294 is the only line that would need to check both values (many or mullti)

@bohandley
Copy link
Contributor Author

bohandley commented Dec 1, 2022

This is fine... but we could/should likely update alll the frontend references to use multi

I think this: https://github.com/grafana/grafana/blob/main/public/app/features/transformers/prepareTimeSeries/prepareTimeSeries.ts#L294 is the only line that would need to check both values (many or mullti)

Thank you Ryan! This is just the enumerable for selecting the format, right? timeSeriesFormat.TimeSeriesMany I changed the format to use Multi, timeSeriesFormat.TimeSeriesMulti and then migrated any old value selections of many in the editor to multi. Tests are all passing. I think we might not even have to do the check in the transformer but I kept it in just to be safe. Let me know what you think!

@bohandley bohandley merged commit f9ef0eb into main Dec 1, 2022
@bohandley bohandley deleted the bohandley/deprecate-timeseries-many branch December 1, 2022 20:27
@dsotirakis dsotirakis modified the milestones: 9.4.0, 9.4.0-beta1 Jan 30, 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

10 participants