lib.teams: Sync from GitHub (members/shortName/scope)#450864
lib.teams: Sync from GitHub (members/shortName/scope)#450864infinisil merged 11 commits intoNixOS:masterfrom
Conversation
2eafc2c to
59c0e1d
Compare
|
Also good point, would this be able to make specifying teams on the website better at https://nixos.org/community/#governance-teams? |
7f154c8 to
14cc579
Compare
|
After some minor changes, I consider this ready! |
This comment was marked as resolved.
This comment was marked as resolved.
3d8e834 to
e913853
Compare
No, that's the wrong conclusion. We backport every change to CI, otherwise we will hit merge conflicts later, for example for automated dependabot PRs etc. This should be backported as well. |
This comment was marked as resolved.
This comment was marked as resolved.
And yes, I think we should do that, too. That's because requesting reviewers always works with the target branch's data, so we want up2date data on the stable branches, too. That means we need to backport the sync, which in turn means we need to backport everything leading up to it. @infinisil are you working on the backport or should i? |
|
@wolfgangwalther Not working on the backport right now, but I could later today |
|
I'm working on the backport right now. Need to backport a few maintainer additions, too... |
|
Backport in #456422. |
|
After fixing #450864 (comment) and manually triggering it, we've got the first automated sync PR: #456477 :D |
This makes `lib.teams` be in sync with the GitHub state. Add the marketing-team so that all teams in `lib.teams` can be requested for reviews. Add these members to the respective teams: - beam: minijackson (53e70ab) - beam: savtrip (f9ff37c) - cuda: prusnak (748896a) - geospatial: autra (7de303b) - geospatial: l0b0 (510eb51) - gnome: bobby285271 (066634e) - gnome: dasj19 (c57c936) - k3s: heywoodlh (2ca18a8) - k3s: rorosen (b9f397d) - php: piotrkwiecinski (148e322) - qt-kde: mjm (f6bb8a9) - qt-kde: NickCao (f6bb8a9) - qt-kde: ilya-fedin (f6bb8a9) - qt-kde: K900 (f6bb8a9) - qt-kde: SuperSandro2000 (f6bb8a9) - qt-kde: LunNova (f6bb8a9) Remove these members from the respective teams: - geospatial: das-g (b93d987) - haskell: expipiplus1 (e134422) - haskell: peti (NixOS#450864 (comment)) - k3s: yajo (8b23811) - k3s: superherointj (7354bda) - ocaml: superherointj (7354bda) - php: drupol (cabc16d) - php: globin (e5d552f) - documentation-team: fricklerhandwerk (https://discourse.nixos.org/t/the-next-chapter-in-nix-documentation/68425) Copy these team descriptions from `lib.teams.*.scope` to the GitHub team description: - nixpkgs-ci: Maintain Nixpkgs' in-tree Continuous Integration, including GitHub Actions - cuda: Maintain CUDA-enabled packages - darwin: Maintain core platform support and packages for macOS and other Apple platforms - documentation-team: Maintain nixpkgs/NixOS documentation and tools for building it. https://nixos.org/community/teams/documentation - enlightenment: Maintain Enlightenment desktop environment and related packages - flutter: Maintain Flutter and Dart-related packages and build tools - geospatial: Maintain geospatial, remote sensing and OpenStreetMap software - golang: Maintain Golang compilers - haskell: Maintain Haskell packages and infrastructure - k3s: Maintain K3s package, NixOS module, NixOS tests, update script - lisp: Maintain the Lisp ecosystem - lua: Maintain the lua ecosystem - lumina: Maintain lumina desktop environment and related packages - lxqt: Maintain LXQt desktop environment and related packages - neovim: Maintain the vim and neovim text editors and related packages - ocaml: Maintain the OCaml compiler and package set - pantheon: Maintain Pantheon desktop environment and platform - qt-kde: Maintain the Qt framework, KDE application suite, Plasma desktop environment and related projects - nixos-release-managers: Manage the current nixpkgs/NixOS release - rocm: Maintain ROCm and related packages - rust: Maintain the Rust compiler toolchain and nixpkgs integration - systemd: Maintain systemd for NixOS - xen-project: Maintain the Xen Project Hypervisor and the related tooling ecosystem (cherry picked from commit 6d89dcd)
|
This makes CI fail for me in #455942, because the maintainer I am proposing to drop is a member of a team, and I remove their maintainers entry. This makes sense, and the error message was even descriptive of the actual problem! But I'm not really sure what the solution is. Should I ping an org owner, or someone listed in the "maintainers" field of maintainers/github-teams.json? When should I do so: now (during the one-week waiting period), or later? Would they be allowed to remove membership before the waiting period is up? And will we need to wait (in the worst case) a second week for the teams to sync, or is manually running the sync workflow considered to be a reasonable option? Ideally, I think the answers to these would be addressed in the error messages? I only knew to "blame" this because I had happened to see this PR (although I'm sure grepping for the error message would have gotten me here too), and I only noticed the significance of the "maintainers" field on the second read of this PR. |
Pinging the most locally relevant person is always best (in line with our distributed decision-making value!), so yeah team maintainer first, and then to the Nixpkgs core team, and then to org owners.
I'd only do it after the one-week waiting period, it shouldn't be removed before that.
Yeah manually running sounds totally fine, all committers can do that and it won't break anything
Sounds like a good idea, PR appreciated! Note that the error can occur both when removing a maintainer or when a GitHub user is added to a team without having a maintainer entry, so the error message would need to present both options. |
|
Another option is also to remove the maintainer by hand from the synced file, so that CI in the "drop the maintainer" PR is happy. Once this is merged, the weekly sync will try to bring back the maintainer, at which point the org owner can clean this up. (this is a bit annoying, because effectively only org owners can merge the weekly sync that way...) We might have just hit a serious limitation of treating GitHub as the source of truth... |
|
I didn't really see this before, but I do now: With this sync from GitHub to Nixpkgs, we are changing the way how maintainers and teams are managed massively: Where ~200 committers were able to make a call on an addition to a team or the removal of a maintainers before, this is (in some cases) now reduced to a few people only: Those marked as maintainers of the GitHub team, or org owners as fallback. A lot of teams don't even have these maintainers. This creates a practical bottleneck on one side - and on the other suddenly makes every team invite-only (aka requiring approval of an existing team member), where before we only had this for a handful of selected teams (mostly company teams), mentioned explicitly. I don't have a solution at hand immediately, but I do see this as a significant problem. |
|
Another issue that @emilazy pointed out: There is no clear process for addition of new members to teams anymore. Before, this required a pull request to the team-list, which allowed for discussion and a paper trail. Now? I'm not even sure. Do I just need to reach out to an existing maintainer of a team in some way, and they will just make a decision / add me ad-hoc on the GitHub side? This seems wrong. We will need to think about our workflows / processes for these cases - and then see whether we can still stick with the idea of syncing GitHub->Nixpkgs, I think. |
|
I wonder about flipping the logic to be more in line with the rfc39 approach? GitHub becomes the source-of-truth, and periodic team syncs (invites/removals) are done by the rfc39 bot. I'm sure we discussed this before, but OTTOMH I can't remember why we decided against this approach. |
This was one of the options considered in #447514 (comment) (and following), but I argued against it in #447514 (comment). My main arguments were security and consistency with a potential move away from rfc39 for different reasons. Now, I guess we can address the problems mentioned in that comment that currently exist with the rfc39 implementation in a different way, too. The security aspect still makes me very uneasy about a nixpkgs -> github migration, though. It's rather simple to add members to precisely one team (nixpkgs-maintainers) as rfc39 currently does. But to migrate team membership, we need to be very careful on which teams we can migrate memberships to, so that we don't accidentally allow privilege escalating, for example by merging members into the nix team or security team or core team (especially the latter has a lot of privileges!), ... AFAIK we can't provide "scoped" privileges for the org-wide team maintenance token, that would be used for that. Although I'm not sure whether GitHub Enterprise could solve that? |
This is only a problem if we ignore how
As listed in #456365, there's just 5 real teams that don't have a maintainer. But this was also a problem before if we care about teams being in sync. Once this is addressed for those teams, we can introduce an assert that ensures all teams have at least one maintainer, so this would be detected in the weekly sync going forward. A related problem (though also not introduced by this PR) is that just having a GitHub team maintainer doesn't mean they're actually maintaining the team in practice. For that I suggest creating an issue that explains how to reach out to team maintainers and to encourage commenting there if they're unresponsive, in which case a Nixpkgs core member / org owner can assign a new maintainer. The only issue I see this PR affecting is the desire for currently Footnotes
|
This implements the basis of #447514 (comment) by:
maintainers/github-teams.jsonfile.members,.shortNameand.descriptionoflib.teamsthat have.githubset based ongithub-teams.json.githubMaintainerfield containing contact information of the GitHub team maintainers, making it easier to know who to ask to join such a teamIn order to bring the state of
lib.teamsin sync with GitHub, I compared the outputs of the two and made two commits to update eitherlib.teamsorgithub-teams.json, see commit messages for details.TODO
lib/tests/teams.nixworksmaintainers/github-teams.json, somebody needs to merge the updates)Add a 👍 reaction to pull requests you find important.