Skip to content

feat: Link maintainers to package - #1406

Open
adekoder wants to merge 1 commit into
NixOS:mainfrom
adekoder:populate_maintainer_to_packages
Open

adekoder wants to merge 1 commit into
NixOS:mainfrom
adekoder:populate_maintainer_to_packages

Conversation

@adekoder

Copy link
Copy Markdown
Collaborator

Linking Maintainers to Package, for easy fetching of package maintainers through package without having to go through the Deriviations

@fricklerhandwerk fricklerhandwerk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Just some style nits, great work!

Comment thread src/shared/package_clustering.py Outdated
# NOTE(@fricklerhandwerk): Extracted query into procedure to instrument testing against race conditions.
attrpath_to_pkg = package_from_attrs(drvs)

on_tracking_branch = set(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By construction when update_packages is set all drvs are from the tracking branch, so we may skip this test and the filter later. It's not wrong to be defensive here, but also it's probably quite a performance hit?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We're running cluster backfilling on each startup, so this can be folded into there. The only thing we may consider is the one-time backfill of just the maintainers, and that could maybe happen in a migration? That may make the backfill command slightly simpler, but may be not even. If the only difference is that the first run with the maintainer additions is longer, that's fine.

cluster_packages(NixDerivation.objects.filter(pk=drv.pk))

package = PackageDerivation.objects.get(derivation=drv).package
assert list(package.maintainers.all()) == [maintainer]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be more obvious if we take drv...maintainer, because otherwise you have to Just Know that the fixture uses maintainer for derivation (and that may change in the future).

release_branch=make_branch(name="release-26.05"),
)
)
rolling = make_evaluation(channel=make_channel())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we maybe make it more explicit that this eval is on the tracking branch? IIRC there's a branch parameter.

@adekoder
adekoder force-pushed the populate_maintainer_to_packages branch 2 times, most recently from 8945b4a to 3e6e417 Compare October 28, 2026 12:53
@adekoder
adekoder force-pushed the populate_maintainer_to_packages branch from 3e6e417 to 96b58ed Compare October 29, 2026 11:26
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.

2 participants