Skip to content

Fix packages with nix teams not showing up#1492

Closed
RossComputerGuy wants to merge 1 commit intorepology:masterfrom
RossComputerGuy:feat/meta-teams
Closed

Fix packages with nix teams not showing up#1492
RossComputerGuy wants to merge 1 commit intorepology:masterfrom
RossComputerGuy:feat/meta-teams

Conversation

@RossComputerGuy
Copy link
Copy Markdown

NixOS/nixpkgs#394797 added a new meta.teams attribute to packages in nix, NixOS/nixpkgs#400458 switched everything to use it. Without this fix, packages which use meta.teams do not show ownership on repology.

@AMDmi3
Copy link
Copy Markdown
Member

AMDmi3 commented Apr 30, 2025

Is there a limit on a number of members in a team?

pkg.add_maintainers(extract_nix_maintainers(meta['maintainers']))

if 'teams' in meta:
if not isinstance(meta['teams'], list):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You don't need data format checks, it should just fail on unexpected data. So this may probably be simplified to

for team in meta.get('teams', []):
    pkg.add_maintainers(extract_nix_maintainers(team['members']))

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done

@SigmaSquadron
Copy link
Copy Markdown

Is there a limit on a number of members in a team?

No. The members list for teams can be arbitrarily long. https://github.com/NixOS/nixpkgs/blob/master/maintainers/team-list.nix#L1-L29

@AMDmi3
Copy link
Copy Markdown
Member

AMDmi3 commented May 2, 2025

Is there a limit on a number of members in a team?

No. The members list for teams can be arbitrarily long. https://github.com/NixOS/nixpkgs/blob/master/maintainers/team-list.nix#L1-L29

We need a safeguard then to avoid N² for large teams maintaining lots of packages. Can either limit a list of maintainers from the team with e.g. 10, with a log if it's exceeded, or add a single maintainer derived from the team name instead.

@AMDmi3 AMDmi3 force-pushed the master branch 2 times, most recently from 1bc89e8 to 25ee7ff Compare May 6, 2025 23:01
@winterqt
Copy link
Copy Markdown

winterqt commented May 8, 2025

N.B. this change isn't needed anymore as meta.maintainers is now inclusive of meta.teams.

@AMDmi3
Copy link
Copy Markdown
Member

AMDmi3 commented May 8, 2025

Should we close this then?

@winterqt
Copy link
Copy Markdown

winterqt commented May 8, 2025

Yes, this patch isn't needed.

AMDmi3 added a commit that referenced this pull request May 13, 2025
@AMDmi3 AMDmi3 closed this May 13, 2025
@RossComputerGuy RossComputerGuy deleted the feat/meta-teams branch May 13, 2025 17:10
AMDmi3 added a commit that referenced this pull request May 14, 2025
@AMDmi3 AMDmi3 mentioned this pull request May 14, 2025
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.

4 participants