Skip to content

Comments

haskellPackages: ignore maintainers without email#213473

Merged
cdepillabout merged 1 commit intoNixOS:haskell-updatesfrom
cdepillabout:ignore-emailless-maint
Jan 30, 2023
Merged

haskellPackages: ignore maintainers without email#213473
cdepillabout merged 1 commit intoNixOS:haskell-updatesfrom
cdepillabout:ignore-emailless-maint

Conversation

@cdepillabout
Copy link
Member

@cdepillabout cdepillabout commented Jan 29, 2023

Description of changes

The Hydra report generator was failing in https://github.com/cdepillabout/nix-haskell-updates-status/actions/runs/4036712903/jobs/6939513150 because there was a user recently(?) added that does not have an email address:

image

The Haskell Hydra report generator (maintainers/scripts/haskell/hydra-report.hs) uses the maintainer-handles.nix script for generating a mapping of email addresses to GitHub handles.

This maintainer-handles.nix script is necessary because the Haskell Hydra report generator gets Hydra job status info as input, but needs to ping users on GitHub. Hydra job status info only contains user emails (not GitHub handles). So the maintainer-handles.nix script is necessary for looking up GitHub handles from email addresses.

This PR fixes the maintainers-handles.nix code to ignore maintainers that don't have email addresses. The code was originally assuming that all maintainers have email addresses, but there was recently a maintainer added without an email address.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.05 Release Notes (or backporting 22.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

The Haskell Hydra report generator
(`maintainers/scripts/haskell/hydra-report.hs`) uses this
`maintainer-handles.nix` script for generating a mapping of email
addresses to GitHub handles.

This `maintainer-handles.nix` script is necessary because the Haskell
Hydra report generator gets Hydra job status info as input, but needs to
ping users on GitHub.  Hydra job status info only contains user emails (not
GitHub handles).  So the `maintainer-handles.nix` script is necessary
for looking up GitHub handles from email addresses.

This commit fixes the `maintainers-handles.nix` code to ignore
maintainers that don't have email addresses.  The code was originally
assuming that all maintainers have email addresses, but there was
recently a maintainer added without an email address.
@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label Jan 29, 2023
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Jan 29, 2023
@cdepillabout
Copy link
Member Author

Allowing maintainers to not have an email address was added in #209165.

@wegank wegank requested a review from ncfavier January 30, 2023 01:32
@ncfavier
Copy link
Member

ncfavier commented Jan 30, 2023

Hydra job status info only contains user emails (not GitHub handles).

Would be nice to fix that in Hydra.

Or just cut out the middle man and construct the mapping "job name → GitHub handle" from nixpkgs directly?

@cdepillabout cdepillabout merged commit d9a9c95 into NixOS:haskell-updates Jan 30, 2023
@cdepillabout cdepillabout deleted the ignore-emailless-maint branch January 30, 2023 23:11
@cdepillabout
Copy link
Member Author

Or just cut out the middle man and construct the mapping "job name → GitHub handle" from nixpkgs directly?

Yeah, that sounds like it might be the ideal thing to do, although I'm not sure how much work it would be.

I think just ignoring maintainers without an email address is the easiest immediate thing we can do, but this definitely sounds like a good future improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants