-
Notifications
You must be signed in to change notification settings - Fork 105
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
devstats,repo_groups: generate repo_groups.sql #332
devstats,repo_groups: generate repo_groups.sql #332
Conversation
Skipping CI for Draft Pull Request. |
0b86fd4
to
67fd05c
Compare
67fd05c
to
a7e1bac
Compare
Updated PR to generate like this, from comment to cncf/devstats#77, where that PR was initially created from a previous version which contained SQL syntax errors, i.e. comma missing etc. |
@xpivarc @jean-edouard may I ask for a review? |
Signed-off-by: Daniel Hiller <[email protected]>
a7e1bac
to
09dcd18
Compare
Tested in job https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/logs/postsubmit-community-update-kubevirt-devstats-repo-sql/1848991035489783808 |
@dhiller if there a way to see the end result? how is this going to look like? |
I just tested this code with a prow job that I created manually - this was the resulting PR that was created: cncf/devstats#80 |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vladikr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@dhiller Forgive my ignorance but does this PR enable us to look at stats at a repository level, rather than a repo group level? (I ask because I was trying to look for devstats on activity in the community repo and couldn't see a way to do so.) |
TBH this is a very good question, which I don't know the answer to out of my head. I always thought of the repo_group conceptually as something that would collect activity of i.e. a group like a sig and gather all activity over several repositories together - so I thought individual repo activity would be obvious by looking at the contributors metrics here: https://github.com/kubevirt/community/graphs/contributors But yes - naturally it would make sense to look at devstats to find something, and I bet there is, i just would need to find it 😄 |
The contributor metrics is useful, but only represents commits (and amount of code changes), whereas devstats provides a more complete picture with reviews, comments, etc |
/uncc @jobbler |
Thinking about this - since we are defining our own custom groups anyway we can configure them anyway we like (at least that's my assumption, would need to let Lukas Griglycki from CNCF devstats project confirm that). When comparing the k8s devstats vs kubevirt devstats I saw that the k8s devstats has something we could need also: I've asked Lukasz whether we can get a copy of that dashboard. |
Didn't look to closely - these wouldn't help us either. So I think the best approach is to define another set of repo-groups - one per repo, so we can select activity by user per repo via a i.e. @aburdenthehand WDYT? |
@dhiller Maaaybe it's a stretch of the 'repo-group' term but if that's something we can do relatively easily then that would be really useful. |
@aburdenthehand if you don't mind - I'd want to do this in a follow-up PR then 😊 |
/lgtm |
What this PR does / why we need it:
CNCF devstats project provides dashboards for KubeVirt that show GitHub data 2. This PR is a required part to keep the repository groups of the user statistics by repository 3 in sync with the content of
sigs.yaml
. PR kubevirt/project-infra#3701 will change the job to use this tool.This PR adds a go tool that generates SQL statements to update repository groups for CNCF devstats 1.
See #330 for more details.
Tested in job https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/logs/postsubmit-community-update-kubevirt-devstats-repo-sql/1848991035489783808
which produced changes reflected from PR #334 in a PR against repo_groups.sql for KubeVirt: https://github.com/cncf/devstats/pull/80/files
Background
KubeVirt repository groups are updated with an SQL script 4 - we want these repository groups to be updated automatically whenever there's changes in our sigs.yaml.
A while ago we had decided to directly align our repository groups to the ownership references inside the sig definitions - in effect this maps any change in a repository to one or more SIGs.
When calling the tool, i.e.
it generates SQL code that is targeted to update the kubevirt repo_groups
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer: