Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build failure: python3Packages.flaks-mail #349350

Closed
0david0mp opened this issue Oct 17, 2024 · 8 comments · Fixed by #349408
Closed

build failure: python3Packages.flaks-mail #349350

0david0mp opened this issue Oct 17, 2024 · 8 comments · Fixed by #349408
Labels

Comments

@0david0mp
Copy link

Describe the bug

I can't build pgadmin4 when declared like services.pgadmin.enable = true, but I can build it with nix build nixpkgs#pgadmin. It seems python312.flask package doesn't pass all the tests:

python3.12-flask-mail> tests/test_message.py ...............................FF.....             [100%]
python3.12-flask-mail> =================================== FAILURES ===================================
python3.12-flask-mail> __________________________ test_unicode_sender_tuple ___________________________
python3.12-flask-mail> app = <Flask 'conftest'>, mail = <flask_mail.Mail object at 0x7ffff56e3c20>
python3.12-flask-mail>     def test_unicode_sender_tuple(app: Flask, mail: Mail) -> None:
python3.12-flask-mail>         msg = Message(
python3.12-flask-mail>             subject="subject",
python3.12-flask-mail>             sender=("ÄÜÖ → ✓", "[email protected]>"),
python3.12-flask-mail>             recipients=["[email protected]"],
python3.12-flask-mail>         )
python3.12-flask-mail> >       assert (
python3.12-flask-mail>             "From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>" in msg.as_string()
python3.12-flask-mail>         )
python3.12-flask-mail> E       assert 'From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>' in 'Content-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: subject...e.com\r\nDate: Thu, 17 Oct 2024 19:14:41 +0000\r\nMessage-ID: <172919248166.157.9918194149393024129@localhost>\r\n\r\n'
python3.12-flask-mail> E        +  where 'Content-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: subject...e.com\r\nDate: Thu, 17 Oct 2024 19:14:41 +0000\r\nMessage-ID: <172919248166.157.9918194149393024129@localhost>\r\n\r\n' = as_string()
python3.12-flask-mail> E        +    where as_string = <flask_mail.Message object at 0x7ffff56e02f0>.as_string
python3.12-flask-mail> tests/test_message.py:423: AssertionError
python3.12-flask-mail> _____________________________ test_unicode_sender ______________________________
python3.12-flask-mail> app = <Flask 'conftest'>, mail = <flask_mail.Mail object at 0x7ffff5734bf0>
python3.12-flask-mail>     def test_unicode_sender(app: Flask, mail: Mail) -> None:
python3.12-flask-mail>         msg = Message(
python3.12-flask-mail>             subject="subject",
python3.12-flask-mail>             sender="ÄÜÖ → ✓ <[email protected]>>",
python3.12-flask-mail>             recipients=["[email protected]"],
python3.12-flask-mail>         )
python3.12-flask-mail> >       assert (
python3.12-flask-mail>             "From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>" in msg.as_string()
python3.12-flask-mail>         )
python3.12-flask-mail> E       assert 'From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>' in 'Content-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: subject....com\r\nDate: Thu, 17 Oct 2024 19:14:41 +0000\r\nMessage-ID: <172919248175.157.17296093936275749371@localhost>\r\n\r\n'
python3.12-flask-mail> E        +  where 'Content-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\nSubject: subject....com\r\nDate: Thu, 17 Oct 2024 19:14:41 +0000\r\nMessage-ID: <172919248175.157.17296093936275749371@localhost>\r\n\r\n' = as_string()
python3.12-flask-mail> E        +    where as_string = <flask_mail.Message object at 0x7ffff5734650>.as_string
python3.12-flask-mail> tests/test_message.py:435: AssertionError
python3.12-flask-mail> =========================== short test summary info ============================
python3.12-flask-mail> FAILED tests/test_message.py::test_unicode_sender_tuple - assert 'From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>' in 'Cont...
python3.12-flask-mail> FAILED tests/test_message.py::test_unicode_sender - assert 'From: =?utf-8?b?w4TDnMOWIOKGkiDinJM=?= <[email protected]>' in 'Cont...
python3.12-flask-mail> ========================= 2 failed, 49 passed in 0.80s =========================

i've also tried installing without it beeing a service (environment.systemPackages = [pkgs.pgadmin4];), with the same luck. Also i've tried disabling test checks and the email server, same logs:

services.pgadmin = {
  enable = true;
  package = pkgs.pgadmin4.overrideAttrs (finalAttrs: previousAttrs: {
    doCheck = false;
    doInstallCheck = false;
  });
  initialPasswordFile = ./initial-pgadmin-pass;
  initialEmail = "Benvenute!";
  emailServer.enable = false;
};

Steps To Reproduce

Steps to reproduce the behavior:

  1. rebuilding my nixos system

Expected behavior

to be able to build the package

Notify maintainers

@gador

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.54, NixOS, 24.11 (Vicuna), 24.11.20241006.c31898a`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - nixpkgs: `/nix/store/rs4fjbnw4qx7ns2hzzrz2iz52va7vs5z-source`

Add a 👍 reaction to issues you find important.

@jackwilsdon
Copy link
Contributor

I think this is just a normal build failure of pgadmin4 caused by flask-mail. The reason you're seeing different results between nix build nixpkgs#pgadmin4 and nixos-rebuild is most likely that the version of nixpkgs differs between the two (the issue only arises on newer Python versions).

I've opened #349408 to disable the tests.

@Atemu Atemu added 0.kind: build failure A package fails to build and removed 0.kind: bug Something is broken labels Oct 18, 2024
@Atemu Atemu changed the title unable to rebuild system because of services.pgadmin build failure: python3Packages.flaks-mail Oct 18, 2024
@0david0mp
Copy link
Author

thanks @jackwilsdon :)

@0david0mp
Copy link
Author

Hi @gador, i've seen that your pr has landed on the nixpkgs-unstable branch, but i'm still seeing the same tests failure. Any advices?

thanks in advance!

@jackwilsdon
Copy link
Contributor

jackwilsdon commented Oct 21, 2024

It seems to be building for me with the following command:

$ nix build github:NixOS/nixpkgs/nixpkgs-unstable#python3Packages.flask-mail

Are you possibly on a revision of nixpkgs-unstable prior to the merge?

@gador
Copy link
Member

gador commented Oct 21, 2024

Hi @gador, i've seen that your pr has landed on the nixpkgs-unstable branch, but i'm still seeing the same tests failure. Any advices?

thanks in advance!

Hi @0david0mp, as @jackwilsdon has pointed out, it could be that your module config is on a different revision than nixpkgs-unstable .You could also use the package option if your module config is different than current unstable, if you wish.
Also, as per https://nixpk.gs/pr-tracker.html?pr=349408 the PR isn't yet in nixos-unstable

@0david0mp
Copy link
Author

ok thanks @gador my entry in the flake.nix was nixos-unstable not nixpkgs-unstable.
it was just a error.
thank you also for the web https://nixpk.gs/pr-tracker.html. I didnt knew it existed.

@cessationoftime
Copy link
Contributor

This still fails on aarch64. These tests run when they shouldn't. So pgadmin installs fine on my desktop but not on my orange pi 5 plus aarch64 system.

@gador
Copy link
Member

gador commented Mar 3, 2025

This still fails on aarch64. These tests run when they shouldn't. So pgadmin installs fine on my desktop but not on my orange pi 5 plus aarch64 system.

Could you open a new issue with a build log? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants