devstats icon indicating copy to clipboard operation
devstats copied to clipboard

mesutoezdil contributions to Project-HAMi/website and kagent-dev/kagent missing from allprj DB

Open moezdil opened this issue 5 months ago • 15 comments

Hi,

My GitHub username is mesutoezdil.

---- https://github.com/mesutoezdil

Contributions to Project-HAMi/HAMi (10 merged PRs) appear correctly in DevStats. However the following are not showing up in the allprj database at all:

  • Project-HAMi/website: 197 merged PRs
  • kagent-dev/kagent: 16 merged PRs

Others would be not in CNCF..

Both orgs are listed in projects.yaml:

  • HAMi uses command_line: - Project-HAMi with start_date: 2024-01-31
  • kagent uses command_line: - kagent-dev with start_date: 2025-02-20

I have many prs for, however, these do not appear to apply to devstat..

1- https://github.com/mesutoezdil/HAMi-DRA 2- https://github.com/mesutoezdil/HAMi 3- kagent-dev/tools 4- kagent-dev/kagent 5- agentevals-dev/agentevals 6- kubernetes-sigs/dra-driver-nvidia-gpu 7- kubernetes-sigs/agent-sandbox

I checked via https://devstats.cluster.fun/?user=mesutoezdil which calls the GithubIDContributions API and returns PRs: 10, matching only Project-HAMi/HAMi.

Could you please backfill or resync Project-HAMi/website and kagent-dev repos in the allprj database?

Thanks

moezdil avatar Jun 02 '26 09:06 moezdil

Image

moezdil avatar Jun 02 '26 10:06 moezdil

Image

moezdil avatar Jun 02 '26 10:06 moezdil

Will check on my next CNCF working day.

lukaszgryglicki avatar Jun 02 '26 10:06 lukaszgryglicki

Will get to this on Friday.

lukaszgryglicki avatar Jun 09 '26 09:06 lukaszgryglicki

Hi @lukaszgryglicki, I may be seeing related behavior for GitHub username syedasadrazadevops.

As of 2026-06-11 13:48 PKT, GithubIDContributions via https://devstats.cluster.fun/?user=syedasadrazadevops returns:

{
  contributions: 13,
  issues: 4,
  prs: 0
}

Recent CNCF activity from this account that does not appear in the PR count yet:

  • https://github.com/helm/chart-testing-action/pull/211
  • https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4686
  • https://github.com/open-telemetry/opentelemetry-cpp/pull/4149
  • https://github.com/prometheus/alertmanager/pull/5297

I also checked the DevStats Repos API for the allprj repository groups, and these repos appear to be configured under Helm, OpenTelemetry, and Prometheus. Could you please advise whether this is expected ingestion/cache delay, or whether it should be treated as an allprj backfill/resync issue similar to this report?

Thank you.

SyedAsadRazaDevops avatar Jun 11 '26 08:06 SyedAsadRazaDevops

@mesutoezdil regarding your original issue - mentioned API queries raw data (not precalculated/materialized) from "ALL CNCF" database.

"All CNCF" means it tracks CNCF projects activity, so 1st I'm checking which of your repos are from any CNCF project but won't be your user's repos like "mesutoezdil/HAMi-DRA" and similar, or those which are not part of CNCF project configuration like "agentevals-dev/agentevals".

Repos tracked in "All CNCF" are orgs/repos listed here.

From repos that you listed, those are tracked within "All CNCF" DevStats instance:

allprj=# select repo_group, name, id from gha_repo_groups where name in ('Project-HAMi/website', 'kagent-dev/kagent', 'mesutoezdil/HAMi-DRA', 'mesutoezdil/HAMi', 'kagent-dev/tools', 'agentevals-dev/agentevals', 'kubernetes-sigs/dra-driver-nvidia-gpu', 'kubernetes-sigs/agent-sandbox');
 repo_group |                 name                  |     id     
------------+---------------------------------------+------------
 kagent     | kagent-dev/kagent                     |  920159501
 kagent     | kagent-dev/tools                      | 1013160609
 Kubernetes | kubernetes-sigs/agent-sandbox         | 1036441713
 Kubernetes | kubernetes-sigs/dra-driver-nvidia-gpu |  629170276
 HAMi       | Project-HAMi/website                  |  747113112
 HAMi       | Project-HAMi/website                  |  786805336
(6 rows)

Basically from kagent, HAMi and Kubernetes CNCF projects.

Now your user data:

allprj=# select * from gha_actors where login = 'mesutoezdil';
    id     |    login    | name | country_id | sex | sex_prob | tz | tz_offset | country_name | age 
-----------+-------------+------+------------+-----+----------+----+-----------+--------------+-----
 114185853 | mesutoezdil |      |            |     |          |    |           |              |    
(1 row)

Then to find all your contributions:

allprj=# select dup_repo_name as repo, type, count(*) as events from gha_events where (actor_id = 114185853 or dup_actor_login = 'mesutoezdil') and type in ('PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent', 'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent') group by 1, 2 order by 3 desc;
         repo          |             type              | events 
-----------------------+-------------------------------+--------
 Project-HAMi/website  | PullRequestEvent              |     47
 kagent-dev/kagent     | IssueCommentEvent             |      3
 kagent-dev/kagent     | PullRequestEvent              |      2
 Project-HAMi/website  | IssuesEvent                   |      2
 Project-HAMi/HAMi     | PullRequestReviewCommentEvent |      2
 Project-HAMi/HAMi     | IssueCommentEvent             |      2
 kagent-dev/tools      | IssueCommentEvent             |      1
 Project-HAMi/website  | IssueCommentEvent             |      1
 Project-HAMi/HAMi-DRA | PullRequestEvent              |      1
 Project-HAMi/HAMi     | PullRequestEvent              |      1
(10 rows)

allprj=# select count(*) from gha_events where (actor_id = 114185853 or dup_actor_login = 'mesutoezdil') and type in ('PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent', 'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent');
 count 
-------
    62
(1 row)

The above query is simplified because API actually also count commits where you are pusher or author or committer, like this:

allprj=#   select
    count(distinct s.event_id) as contributions
  from (
    select
      event_id
    from
      gha_commits
    where
      lower(dup_actor_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits
    where
      lower(dup_author_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits
    where
      lower(dup_committer_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits_roles
    where
      lower(actor_login) = 'mesutoezdil'
    union select
      id as event_id
    from
      gha_events
    where
      lower(dup_actor_login) = 'mesutoezdil'
      and type in (
        'PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent',
        'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent'
      )
    ) s;
 contributions 
---------------
           166
(1 row)

So your "score" now is 166.

I'm checking the PRs part and issues part now. Just FYI.

lukaszgryglicki avatar Jun 12 '26 06:06 lukaszgryglicki

@mesutoezdil regarding your original issue - mentioned API queries raw data (not precalculated/materialized) from "ALL CNCF" database.

"All CNCF" means it tracks CNCF projects activity, so 1st I'm checking which of your repos are from any CNCF project but won't be your user's repos like "mesutoezdil/HAMi-DRA" and similar, or those which are not part of CNCF project configuration like "agentevals-dev/agentevals".

Repos tracked in "All CNCF" are orgs/repos listed here.

From repos that you listed, those are tracked within "All CNCF" DevStats instance:

allprj=# select repo_group, name, id from gha_repo_groups where name in ('Project-HAMi/website', 'kagent-dev/kagent', 'mesutoezdil/HAMi-DRA', 'mesutoezdil/HAMi', 'kagent-dev/tools', 'agentevals-dev/agentevals', 'kubernetes-sigs/dra-driver-nvidia-gpu', 'kubernetes-sigs/agent-sandbox');
 repo_group |                 name                  |     id     
------------+---------------------------------------+------------
 kagent     | kagent-dev/kagent                     |  920159501
 kagent     | kagent-dev/tools                      | 1013160609
 Kubernetes | kubernetes-sigs/agent-sandbox         | 1036441713
 Kubernetes | kubernetes-sigs/dra-driver-nvidia-gpu |  629170276
 HAMi       | Project-HAMi/website                  |  747113112
 HAMi       | Project-HAMi/website                  |  786805336
(6 rows)

Basically from kagent, HAMi and Kubernetes CNCF projects.

Now your user data:

allprj=# select * from gha_actors where login = 'mesutoezdil';
    id     |    login    | name | country_id | sex | sex_prob | tz | tz_offset | country_name | age 
-----------+-------------+------+------------+-----+----------+----+-----------+--------------+-----
 114185853 | mesutoezdil |      |            |     |          |    |           |              |    
(1 row)

Then to find all your contributions:

allprj=# select dup_repo_name as repo, type, count(*) as events from gha_events where (actor_id = 114185853 or dup_actor_login = 'mesutoezdil') and type in ('PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent', 'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent') group by 1, 2 order by 3 desc;
         repo          |             type              | events 
-----------------------+-------------------------------+--------
 Project-HAMi/website  | PullRequestEvent              |     47
 kagent-dev/kagent     | IssueCommentEvent             |      3
 kagent-dev/kagent     | PullRequestEvent              |      2
 Project-HAMi/website  | IssuesEvent                   |      2
 Project-HAMi/HAMi     | PullRequestReviewCommentEvent |      2
 Project-HAMi/HAMi     | IssueCommentEvent             |      2
 kagent-dev/tools      | IssueCommentEvent             |      1
 Project-HAMi/website  | IssueCommentEvent             |      1
 Project-HAMi/HAMi-DRA | PullRequestEvent              |      1
 Project-HAMi/HAMi     | PullRequestEvent              |      1
(10 rows)

allprj=# select count(*) from gha_events where (actor_id = 114185853 or dup_actor_login = 'mesutoezdil') and type in ('PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent', 'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent');
 count 
-------
    62
(1 row)

The above query is simplified because API actually also count commits where you are pusher or author or committer, like this:

allprj=#   select
    count(distinct s.event_id) as contributions
  from (
    select
      event_id
    from
      gha_commits
    where
      lower(dup_actor_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits
    where
      lower(dup_author_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits
    where
      lower(dup_committer_login) = 'mesutoezdil'
    union select
      event_id
    from
      gha_commits_roles
    where
      lower(actor_login) = 'mesutoezdil'
    union select
      id as event_id
    from
      gha_events
    where
      lower(dup_actor_login) = 'mesutoezdil'
      and type in (
        'PushEvent', 'PullRequestEvent', 'IssuesEvent', 'PullRequestReviewEvent',
        'CommitCommentEvent', 'IssueCommentEvent', 'PullRequestReviewCommentEvent'
      )
    ) s;
 contributions 
---------------
           166
(1 row)

So your "score" now is 166.

I'm checking the PRs part and issues part now. Just FYI.

many thanks! It's still very low; there are over 200 in just one repository (hami/website).

moezdil avatar Jun 12 '26 06:06 moezdil

Yes, looks like PRs/issues here are only number of distinct PRs/Issues that had activity in "events" table, which is not including all possible activities like opened/merged etc - I'm fixing this now, actually the important field was "contributions" and PRs/issues were informative, but let's make it as precise as possible to data we have

lukaszgryglicki avatar Jun 12 '26 06:06 lukaszgryglicki

I see what is the issue, will fix in an hour or so, this should probably also solve @SyedAsadRazaDevops issue as well.

lukaszgryglicki avatar Jun 12 '26 07:06 lukaszgryglicki

I see what is the issue, will fix in an hour or so, this should probably also solve @SyedAsadRazaDevops issue as well.

I've just updated the entire PR list in my own repo as well

Image

moezdil avatar Jun 12 '26 07:06 moezdil

I don't see exact count matching with your screenshot, but GitHub sometimes have outages and GHA data is not regeistered then, so expect numbers to be "closer" to what you see on GitHub but not exact.

lukaszgryglicki avatar Jun 12 '26 07:06 lukaszgryglicki

I don't see exact count matching with your screenshot, but GitHub sometimes have outages and GHA data is not regeistered then, so expect numbers to be "closer" to what you see on GitHub but not exact.

here is it: https://github.com/mesutoezdil#pr-contributions

Difference is huge :)

moezdil avatar Jun 12 '26 07:06 moezdil

This should be fixed now (new API is deployed and the cache is cleared):

Image Image

lukaszgryglicki avatar Jun 12 '26 12:06 lukaszgryglicki

@lukaszgryglicki thx mate! Do I need to add this somewhere when I open a PR in future projects or repos, or will everything be automatic from now on?

moezdil avatar Jun 12 '26 12:06 moezdil

Should be automatic, but can be delayed about a day or so, also data quality is as good as data that is stored on GHA (GitHub archives).

lukaszgryglicki avatar Jun 12 '26 12:06 lukaszgryglicki