Skip to content

Conversation

@stefano-garzarella
Copy link
Member

Add in the MAINTAINERS.md file the inactive CODEOWNERS policy and templates for issue notifications and removal PRs. Also add the
check_inactive_codeowners.py script (and documentation) to be used for identifying inactive members.

See #187 for more details.

Note: The script was written with the help of Claude. I added the Co-Authored-By tag, but since we don't have a policy yet, I don't know if it's necessary or not, especially since it's just a script and not part of our codebase.

Example of running the script on vhost repo:

$ time ./scripts/check_inactive_codeowners.py --repo vhost    
Fetching CODEOWNERS from rust-vmm/vhost...
Found 8 codeowners: Ablu, epilys, eryugey, germag, jiangliu, sboeuf, slp, stefano-garzarella

Checking activity since 2024-10-09 (365 days ago)

Checking Ablu ... Active (commits: 0, reviews: 18, PR comments: 5, issue comments: 0)
Checking epilys ... Active (commits: 1, reviews: 10, PR comments: 2, issue comments: 1)
Checking eryugey ... INACTIVE
Checking germag ... Active (commits: 1, reviews: 13, PR comments: 2, issue comments: 2)
Checking jiangliu ... INACTIVE
Checking sboeuf ... Active (commits: 0, reviews: 1, PR comments: 0, issue comments: 0)
Checking slp ... Active (commits: 1, reviews: 1, PR comments: 0, issue comments: 1)
Checking stefano-garzarella ... Active (commits: 10, reviews: 43, PR comments: 31, issue comments: 2)

================================================================================
SUMMARY
================================================================================
Total codeowners: 8
Active: 6
Inactive: 2
Non-existent: 0

Inactive codeowners (no activity in the last 365 days):
  - @eryugey
  - @jiangliu
./scripts/check_inactive_codeowners.py --repo vhost  1.48s user 0.14s system 1% cpu 1:45.23 total

Example with --fast option (faster but less accurate comment detection to reduce API calls)

$ time ./scripts/check_inactive_codeowners.py --repo vhost --fast
Fetching CODEOWNERS from rust-vmm/vhost...
Found 8 codeowners: Ablu, epilys, eryugey, germag, jiangliu, sboeuf, slp, stefano-garzarella

Checking activity since 2024-10-08 (365 days ago)

Checking Ablu ... Active (commits: 0, reviews: 18, PR comments: 21, issue comments: 0)
Checking epilys ... Active (commits: 1, reviews: 8, PR comments: 10, issue comments: 1)
Checking eryugey ... INACTIVE
Checking germag ... Active (commits: 1, reviews: 13, PR comments: 13, issue comments: 2)
Checking jiangliu ... Active (commits: 0, reviews: 0, PR comments: 1, issue comments: 0)
Checking sboeuf ... Active (commits: 0, reviews: 1, PR comments: 1, issue comments: 0)
Checking slp ... Active (commits: 1, reviews: 1, PR comments: 1, issue comments: 1)
Checking stefano-garzarella ... Active (commits: 10, reviews: 42, PR comments: 54, issue comments: 2)

================================================================================
SUMMARY
================================================================================
Total codeowners: 8
Active: 7
Inactive: 1

Inactive codeowners (no activity in the last 365 days):
  - @eryugey
./scripts/check_inactive_codeowners.py --repo vhost --fast 2> /dev/null  0.27s user 0.02s system 1% cpu 24.172 total

@stefano-garzarella
Copy link
Member Author

cc @roypat @epilys @RuoqingHe

Some open questions:

  1. I considered "commits" as part of the maintainer activity, but I'm not sure about that.
  2. Should we better define the frequency with which we check? (Perhaps not, until we integrate everything into CI)

@RuoqingHe
Copy link
Member

Great work, thanks for taking this forward ❤️

  1. I considered "commits" as part of the maintainer activity, but I'm not sure about that.

IMO commits should surely be a factor of measuring maintainers' involvement

  1. Should we better define the frequency with which we check? (Perhaps not, until we integrate everything into CI)

We can leave this until we setting up the workflow, and by that time we can achieve it with schedule

When inactive CODEOWNERS are identified, an issue should be created in the
community repository using this template:

```markdown
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to extract these templates into separate markdown files and just reference them here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I can do that, but what would be the advantage of having it in a separate file?

@roypat
Copy link
Member

roypat commented Oct 14, 2025

Thank you so much for tackling this! The documentation looks good to me :)

cc @roypat @epilys @RuoqingHe

Some open questions:

1. I considered "commits" as part of the maintainer activity, but I'm not sure about that.

Mhh, I'm actually not sure either. If you just submit a PR, that isn't really a "maintainer" activity (unless you do it to respond to an issue, but then surely you'd also respond in that issue). But I think having someone who just commits without actually reviewing any PRs / issues by others is not really something that'll happen (which, actually, we should probably exclude comments on one's own PR from counting?)

2. Should we better define the frequency with which we check? (Perhaps not, until we integrate everything into CI)

Also, do we run this centrally in the community repo, or in each repo's individual CI? I guess for the latter the script would need to live in rust-vmm-ci. I'm also fine with the former, but maybe then we should have something that queries the organization for all repositories, to make sure we don't miss any if new ones are added (although mostly a moot point given we want to go mono-repo).

@stefano-garzarella
Copy link
Member Author

v2:

  • used PyGitHub module and avoided our custom rate-limit function (BTW I saw several backoff warnings, so I'm not sure if they are really respecting the info returned by GH API, so let's see because using it will reduce a lot our code) [@stsquad]
  • added requirements.txt
  • used logging instead of a custom function

@stefano-garzarella
Copy link
Member Author

Thank you so much for tackling this! The documentation looks good to me :)

cc @roypat @epilys @RuoqingHe
Some open questions:

1. I considered "commits" as part of the maintainer activity, but I'm not sure about that.

Mhh, I'm actually not sure either. If you just submit a PR, that isn't really a "maintainer" activity (unless you do it to respond to an issue, but then surely you'd also respond in that issue).

Yeah, same concern I had. @RuoqingHe are you okay if we remove the commits from the activity?

But I think having someone who just commits without actually reviewing any PRs / issues by others is not really something that'll happen (which, actually, we should probably exclude comments on one's own PR from counting?)

Good point, I'll add that to the filter on both PR and issues.

2. Should we better define the frequency with which we check? (Perhaps not, until we integrate everything into CI)

Also, do we run this centrally in the community repo, or in each repo's individual CI? I guess for the latter the script would need to live in rust-vmm-ci. I'm also fine with the former, but maybe then we should have something that queries the organization for all repositories, to make sure we don't miss any if new ones are added (although mostly a moot point given we want to go mono-repo).

Not sure where to run honestly, for now it's kind of manual action, for that reason I put here near the documentation, but I can definitely move it in rust-vmm-ci and also add a parameter to loop to all repos (not sure how to skip some of them, maybe if there are no CODEONWERS file, skip it?)

@stefano-garzarella
Copy link
Member Author

v3:

  • didn't count own PRs/issues as commented [@roypat]

@RuoqingHe
Copy link
Member

Thank you so much for tackling this! The documentation looks good to me :)

cc @roypat @epilys @RuoqingHe
Some open questions:

1. I considered "commits" as part of the maintainer activity, but I'm not sure about that.

Mhh, I'm actually not sure either. If you just submit a PR, that isn't really a "maintainer" activity (unless you do it to respond to an issue, but then surely you'd also respond in that issue).

Yeah, same concern I had. @RuoqingHe are you okay if we remove the commits from the activity?

That makes sense, I was thinking a maintainer having commits recently could be positive factor of showing he/her involvement in the project, but eventually, as a maintainer, they should be reviewing code and responding to issues, that's more like it.

stefano-garzarella and others added 2 commits October 15, 2025 23:10
Introduces a Python script that checks CODEOWNERS against GitHub activity
(reviews, PR/issue comments) over a configurable time period.

Co-Authored-By: Claude <[email protected]>
Signed-off-by: Stefano Garzarella <[email protected]>
The policy defines inactivity (1 year without review activity), outlines
the removal process with notification periods, and provides templates
for issue notifications and removal PRs.
Also document the `check_inactive_codeowners.py` script usage for
identifying inactive members.

See #187 for more details.

Signed-off-by: Stefano Garzarella <[email protected]>
@stefano-garzarella
Copy link
Member Author

v4:

  • looped by all org repo by defualt (user can still specify a subset) [@roypat]
    • skip repo without CODEOWNERS file (or empyt)
    • skip archived repos
    • support multiple repos (--repos optional, default all repo under the org)
  • didn't count commits in the report (--include-commits can be used eventually) [@roypat @RuoqingHe ]
  • fixed double log print (pygithub set their own handler)
  • fixed some pylint warning
  • reduced usage of search API to avoid secondary limit and optimized the parsing (issue 2 search API call, one for PR and one for ISSUE for all users, then use core API call to check single user activity)
  • removed --fast option since it's hard to implement with the new optimization
  • improved the summary report
  • updated MAINTAINERS.md with latest changes

@stefano-garzarella
Copy link
Member Author

Running the script on our organization (so on all repos), it takes around 14 mins.

This is the summary generated:

================================================================================
SUMMARY - Activity from 2024-10-15 to 2025-10-15 (365 days)
================================================================================

Total repositories: 33

Repositories with all codeowners active (2):
  - mshv
  - vhost-device

Repositories skipped (13):
  - .github
  - community
  - crate-template
  - io-rate-limiter
  - kvm-bindings
  - kvm_wrapper
  - vfio-bindings
  - vfio-ioctls
  - vfio-user
  - vhost-user-backend
  - virtio-bindings
  - vm-pci
  - vmm-vcpu

Repositories with inactive or non-existent codeowners (18):
  - acpi_tables:
      Active: @rbradford, @sboeuf
      Inactive: @jiangliu, @liuw
  - event-manager:
      Active: @ShadowCurse, @roypat
      Inactive: @alexandruag, @andreeaflorescu
  - kvm:
      Active: @ShadowCurse, @andreeaflorescu, @lauralt, @roypat
      Inactive: @acatangiu, @sameo
      Non-existent: @aghecenco
  - linux-loader:
      Active: @ShadowCurse, @rbradford, @roypat
      Inactive: @andreitraistaru, @sameo
      Non-existent: @aghecenco
  - rust-vmm-ci:
      Active: @ShadowCurse, @roypat
      Inactive: @andreeaflorescu, @gsserge, @lauralt, @sameo
  - rust-vmm-container:
      Active: @RuoqingHe, @ShadowCurse, @roypat, @stefano-garzarella, @stsquad
      Inactive: @andreeaflorescu, @gsserge, @lauralt
  - seccompiler:
      Active: @alindima
      Inactive: @petreeftime
  - vfio:
      Active: @jinankjain, @likebreath, @liuw, @rbradford, @russell-islam
      Inactive: @jiangliu, @sameo, @sboeuf
  - vhost:
      Active: @Ablu, @epilys, @germag, @slp, @stefano-garzarella
      Inactive: @eryugey, @jiangliu, @sboeuf
  - vm-allocator:
      Active: @AlexandruCihodaru, @ShadowCurse, @roypat
      Inactive: @alsrdn, @andreeaflorescu, @gsserge, @jiangliu, @studychao
  - vm-device:
      Inactive: @alexandruag, @gsserge, @jiangliu
  - vm-fdt:
      Inactive: @danielverkamp
  - vm-memory:
      Active: @ShadowCurse, @XanClic, @bonzini, @roypat
      Inactive: @alexandruag, @jiangliu, @tkreuzer
  - vm-superio:
      Active: @ShadowCurse, @roypat
      Inactive: @andreeaflorescu, @gsserge, @lauralt
  - vm-virtio:
      Active: @andreeaflorescu, @epilys, @stefano-garzarella, @stsquad
      Inactive: @alexandruag, @jiangliu, @slp
  - vmm-reference:
      Inactive: @alexandruag, @andreeaflorescu, @gsserge, @lauralt
  - vmm-sys-util:
      Active: @ShadowCurse, @roypat
      Inactive: @andreeaflorescu, @jiangliu, @liujing2, @sameo
  - xen:
      Active: @epilys, @stsquad
      Inactive: @mathieupoirier

Full log is available here: https://pastebin.com/5JVfxLjF

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.

5 participants