Repository navigation
Conversation
parsedmarc has been broken for a while, since the elasticsearch python packages were upgraded past its supported versions. To fix this, pin the versions locally.
| @@ -1,3 +1,24 @@ | |||
| { pythonPackages }: | |||
| let | |||
| packages = pythonPackages.overrideScope (final: prev: { | |||
There was a problem hiding this comment.
We can't override within pythonPackages.
Should we set meta.broken = true if the elasticsearch or elasticsearch-dsl version is too high? I assume most of the Python API still works.
We can override the package in all-packages.nix or in the NixOS module.
There was a problem hiding this comment.
Why is that? It works just fine and seems to be done in a few packages already.
Maybe? I don't use it any other way than as a server.
Overriding in all-packages.nix feels like a definite anti-pattern, since it means what you're seeing in the package file isn't what you expect. The sane alternative I can think of is to create new packages with the version pinned, but that seemed a bit unnecessary for just one package.
There was a problem hiding this comment.
Why is that? It works just fine and seems to be done in a few packages already.
You cannot have two versions of a Python module in the same environment. That could happen if parsedmarc is used together with another module that uses the elasticsearch module.
There was a problem hiding this comment.
If so, we can never package multiple versions of the same python module, but this is at least already done for django. Overriding is also already done in other python modules. Overriding in the NixOS module is really bad for maintainability. Doing it in all-packages.nix (which isn't even used, currently) would be even worse. I would rather move it out of pythonPackages if so. No other package depends on parsedmarc - it's only used by the NixOS module.
However, I'm very doubtful this is even a real concern. In reality, you wouldn't be able to have your project depend on both parsedmarc and the latest version of elasticsearch at the same time, since parsedmarc restricts the version to the one I'm pinning here. Since elasticsearch has changed enough that parsedmarc is now broken with the latest version, any other module targeting the same version of it would likely also be broken the same way. So, in essence we would be optimizing for the opportunity of building broken environments.
25979c5 to
b5db61e
Compare
Switch to OpenSearch, an open source and compatible fork of Elasticsearch, as the default locally deployed search engine. This means it's once again possible to run parsedmarc without unfree packages and the tests should therefore run in CI.
An incomplete implementation which left out null values was added in NixOS#246992. Complete it by adding the missing check.
b5db61e to
cac2a81
Compare
Description of changes
Problems
parsedmarc has been broken for a while now, due to incompatible updates of the Elasticsearch python packages. This probably wasn't very obvious to anyone as the tests require
allowUnfree, since Elasticsearch is no longer open source.Solutions
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.