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

Refactor datasource features as mixins #91

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

ddelemeny
Copy link
Contributor

Why ?
A datasource is a complex class implementing various functional aspects.
On the abstract side, grafana splits the Datasource API into feature-sized interfaces.

Implementing features as mixins allow us to match that organization in our implementation, which hopefully translates into more readable code and more manageable chunks of logic as we implement more features.

It could also allow us to easily activate/deactivate a feature in a build, which may be handy when debugging and/or releasing.

See also : grafana/plugin-tools#783

@ddelemeny ddelemeny marked this pull request as draft February 22, 2024 12:21
@ddelemeny ddelemeny force-pushed the ddelemeny/refactor-datasource-mixins branch from aabbb30 to d11100f Compare February 22, 2024 12:35
@ddelemeny ddelemeny marked this pull request as ready for review February 22, 2024 12:41
@ddelemeny ddelemeny force-pushed the ddelemeny/refactor-datasource-mixins branch from d11100f to 21e582f Compare February 26, 2024 15:30
@ddelemeny ddelemeny merged commit e4869da into main Feb 26, 2024
2 checks passed
@ddelemeny ddelemeny deleted the ddelemeny/refactor-datasource-mixins branch March 11, 2024 15:11
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.

2 participants