cncf / devstats.archive

📈CNCF-created tool for analyzing and graphing developer contributions
https://devstats.cncf.io/
Apache License 2.0
444 stars 147 forks source link

Chart Request: open issues/PRs by milestone #77

Closed jberkus closed 6 years ago

jberkus commented 6 years ago

Request: Count of open issues and open PRs by milestone, as a line graph. Should be filterable by SIG.

I really only care about kubernetes/kubernetes for this, so filtering down to that would also be nice.

jberkus commented 6 years ago

In the best of all possible worlds, I'd be able to somehow add vertical lines showing release cycle dates, or even comparable by days for each release date.

lukaszgryglicki commented 6 years ago

I'm working on this but I suspect there will be not enough data. Why?

The second question - how it should look like?

Vertical lines showing release cycles:

So I will implement approach with:

I expect many corrections/clarifications/feedback here, so I will just implement first draft version - without docs and test coverage, to avoid correcting docs and tests after feedback is received.

lukaszgryglicki commented 6 years ago

This is the very very very first SQL that returns correct data: https://github.com/cncf/devstats/blob/master/metrics/kubernetes/open_prs_sigs_milestones.sql

Now I need to add "All" entry and then create Milestones tags, dropdown etc. Then I need to create similar SQL for issues.

But my biggest concern is gone - performance, I was afraid that indexes and current structure won't handle this fast, but query only takes about 1.2s so it is OK (we have a lot slower queries already, the slowest being PRs rebase).

lukaszgryglicki commented 6 years ago

First preview ready: https://k8s.devstats.cncf.io/d/IIUa5kezk/open-issues-prs-by-milestone?orgId=1

SQL are here:

There is no test coverage and no documentation because I'm expecting some feedback. If approved I'll add test coverage & documentation.

Few screenshots: screen shot 2018-02-22 at 13 28 01 screen shot 2018-02-22 at 13 26 25 screen shot 2018-02-22 at 13 26 42 screen shot 2018-02-22 at 13 28 48 screen shot 2018-02-22 at 13 26 48 screen shot 2018-02-22 at 13 29 03 screen shot 2018-02-22 at 13 27 01 screen shot 2018-02-22 at 13 29 12 screen shot 2018-02-22 at 13 27 17 screen shot 2018-02-22 at 13 29 29 screen shot 2018-02-22 at 13 27 25 screen shot 2018-02-22 at 13 29 48 screen shot 2018-02-22 at 13 27 37 screen shot 2018-02-22 at 13 30 12 screen shot 2018-02-22 at 13 27 42 screen shot 2018-02-22 at 13 27 52

Here I've manually selected v1.8 - v.1.9 from Grafana's date picker (top right): screen shot 2018-02-22 at 13 55 17

Would be great if we could have "annotations dates list" as a predefined values to select on date picker UI. For example you can select "date from": last month, day etc (what is there now) + drop-down to select any value from annotations query. The same for "date to". I've created such feature request on grafana/grafana long time ago, but unfortunatelly it seems that no one want to implement this. If we really need that, I can spent few days forking Grafana and trying to implement this and creating PR finally - but I don't know whow long it would take and if they accept this PR.

jberkus commented 6 years ago

That's a really good start, and I can use that even the way it is now.

Here's what I'm trying to do: compare the number of open issues/PRs in a milestone for this release with the number of issues/PRs open for prior releases the same number of days before the expected release date.

I'm trying to determine if we have an actual, significant increase in the number of open issues/PRs for v1.10, or if that's just anecdotal.

So the ideal "smart" chart, I think, would be to show each of several selected milestones based on "days before release", on the same chart, so that they could be directly compared. However, that would have a bunch of requirements to make it work, such as having the release/slush/freeze dates in the DB, and also planned vs. actual release dates. Let me know if you want to pursue doing this kind of chart, and I can map out what it should look like a bit more clearly.

I also need the chart you just created, simply because I need to see if PRs are catching up to issues for the current release, which it shows nicely.

Question: is milestone already in the time-series database? That is, can I find out from InfluxDB how many open issues there were in 1.9 as of December 12th?

jberkus commented 6 years ago

Never mind, I answered my own question by checking:

https://k8s.devstats.cncf.io/d/IIUa5kezk/open-issues-prs-by-milestone?orgId=1&from=1501630754665&to=1504395554666&var-sig_name=All&var-sig=all&var-milestone_name=v1.8&var-milestone=v1_8

Looks like we do have full timeline history for milestones. Yay!

grodrigues3 commented 6 years ago

I have a similar feature request. For the features repo, we track issue by posted (e.g v1.10). It'd be great if we could see a histogram of features per release per sig. Something like a dropdown where I can select the milestone and the chart is a histogram of the feature count coming from each sig.

Edit. this may be an identical request. I'm just asking that the issues query (which represent features) also be run agains the k/features repo).

lukaszgryglicki commented 6 years ago

OK so it is just a matter of choosing repo? If so I can add Repository drop-down or repository group drop down? There will be a small delay because I have some work in progress atm.

lukaszgryglicki commented 6 years ago

I'm adding repository dropdown. It will contain all repositories. If that is too much, I will limit drop-down values (if needed).

lukaszgryglicki commented 6 years ago

Added repository drop-down: https://k8s.devstats.cncf.io/d/IIUa5kezk/open-issues-prs-by-milestone?orgId=1

For example:

@grodrigues3 Is this OK? Or maybe should I change something - like for example create another dashboard with multiple selection for SIG-s to display more of them stacked, or possibly multi select for Repo and stack them? Or anything else? @jberkus - you need to select Repo = kubernetes/kubernetes to have the same version as before.

jberkus commented 6 years ago

Ooops, PRs just vanished from the chart. Fix?

lukaszgryglicki commented 6 years ago

My fault:

jberkus [7:40 PM]
around?  the new contributors graph appears to be broken

PRs aren't showing at all
https://k8s.devstats.cncf.io/d/IIUa5kezk/open-issues-prs-by-milestone?orgId=1&from=now-30d&to=now&var-sig_name=All&var-sig=all&var-milestone_name=v1.10&var-milestone=v1_10&var-repo_name=kubernetes%2Fkubernetes&var-repo=kubernetes_kubernetes&var-full_name=Kubernetes
sorry, NOT the new contributors graph.  the "PRs/Issues by Milestone" graph.

lukaszgryglicki [8:11 PM]
I probably know what’s wrong
but its 8PM in Poland atm
I’ll fix tomorrow
can you please add comment on the original issue
on cncf/devstats

jberkus [8:12 PM]
OK

lukaszgryglicki [8:12 PM]
as a reminder
you can just copy what you written here
I prefer to have everything public on the repo
this is just copy-paste issue
I didn’t changed series name when milestone is selected
note that if you select All - you’ll see data
just need to rename influx series name in SQL 9which I can do now) but then regenerate data is needed, stopping cron etc

jberkus [8:13 PM]
ok, thanks!

lukaszgryglicki [8:14 PM]
cu
gotta go

Will fix tomorrow first thing.

lukaszgryglicki commented 6 years ago

@jberkus decided to fix today. Should be fixed now. On both test & prod servers. Let me know if works OK for you.

This was the cause for this: https://github.com/cncf/devstats/commit/3efab6e6933f0bed1b9812043e6f6be8383a2f5c#r27820594

jberkus commented 6 years ago

Fixed, thanks!