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

Status of Project? #152

Open
safaci2000 opened this issue Jun 24, 2021 · 3 comments
Open

Status of Project? #152

safaci2000 opened this issue Jun 24, 2021 · 3 comments

Comments

@safaci2000
Copy link
Contributor

I see several PRs and tickets that are months old and I also had a few commits in that have been pending for a while. I understand that everyone has their lives and such that keeps them busy. I'm just curious if maybe you guys are looking for help? or what the interest is in the sdk at this point?

I ended up forking the project and using the fork in my own project since the PRs were taking too long to get in but this seems like a pretty active project so I'd love to be able to contribute back to it and help if I can. Particularly since work has an interest in the tools i'm developing with SDK so I can do spend some paid cycles on this.

Any updates would be appreciated.

@GiedriusS
Copy link
Collaborator

You are correct that this project is a bit neglected ATM. IRL is taking up a lot of my time nowadays. Lots of work needs to be done. Some things that pop to my mind:

  • Divide the package along Grafana's major versions: v6, v7, v8, ..., etc.
  • Clean up the function parameters to have the standards everywhere & return values
  • Avoid using interface{} and make some kind of wrappers for sum types; start using generics when Go 2.x comes around. Due to this, I am a bit reluctant to merge PRs where the type is simply changed to a interface{}. We should try to expand https://github.com/grafana-tools/sdk/blob/f7c763c3738c279f7e926c5a3bc8353b4080312b/custom-types.go.
  • All of the other issues on this repo

I have heard some good news that Grafana folks are working on a formal spec for the API so hopefully, things will be easier in the future.

If you have some free time to work on this repo then maybe we can create some small channel for this library somewhere (IRC? Slack?) and discuss matters in there? I'm open to adding more maintainers.

@safaci2000
Copy link
Contributor Author

the interface{} is indeed something to avoid but a bit harder to handle when the return type of the same field changes datatypes in the same request. That's such a horrible design IMO.

My ask if you have the time.

  1. If you have a roadmap or such on what you'd like to get done I can try to help that along. (besides what you wrote above)
  2. CustomTypes is fine, though something I haven't been able to find is a contract definition where the Grafana API defines what values field X is going to look like. Most of the bugs/fixes I've been doing is due to testing where I find behavior breaks things.
  3. I think another item to add that would be a nice to have is breaking the calls into an Admin calls and regular APIs. There's a subset of API calls that seem to not support token base Auth. Maybe even validate the type of auth against the call and just fail before even making the call.

+1 for versioning though, it'd be great to just set a version of grafana when you get the client, and reflect which calls are supported.

@GiedriusS
Copy link
Collaborator

the interface{} is indeed something to avoid but a bit harder to handle when the return type of the same field changes datatypes in the same request. That's such a horrible design IMO.

My ask if you have the time.

  1. If you have a roadmap or such on what you'd like to get done I can try to help that along. (besides what you wrote above)
  2. CustomTypes is fine, though something I haven't been able to find is a contract definition where the Grafana API defines what values field X is going to look like. Most of the bugs/fixes I've been doing is due to testing where I find behavior breaks things.
  3. I think another item to add that would be a nice to have is breaking the calls into an Admin calls and regular APIs. There's a subset of API calls that seem to not support token base Auth. Maybe even validate the type of auth against the call and just fail before even making the call.

+1 for versioning though, it'd be great to just set a version of grafana when you get the client, and reflect which calls are supported.

I don't think there's anything else besides what's in that list + in the bug tracker here. And also of course ideally we'd have 100% API coverage 😄

As for (2), I typically look into the TypeScript code to see what types are accepted for variables. Some Grafana folks recently have contacted me and they told me that they are working on defining a full API contract so the future looks bright 🤞

(3) sounds good, I wasn't aware of that 😄 I need to finish #129 now because Travis seems to be completely dead (:

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

No branches or pull requests

2 participants