Repository navigation
ceph: fix - #548582
ceph: fix#548582
Conversation
|
| "test_valid_addr" | ||
| ]; | ||
|
|
||
| # importlib.metadata.PackageNotFoundError: No package metadata was found for ceph-common |
There was a problem hiding this comment.
Looks like the package name is just ceph, shall we rename it? https://github.com/ceph/ceph/blob/696cf11d2cd67e21759ec694199dd3e7c1d72599/src/python-common/pyproject.toml#L2
There was a problem hiding this comment.
I first intended to ask whether a drawback of that wouldn't be ambiguous build output such as
these 12 derivations will be built:
/nix/store/123...-ceph-20.nix
/nix/store/456...-ceph-20.nix
where you cannot tell the C++ from the Python build easily, and it looks like 2 big Ceph builds, but then I found it is already rendered differently:
/nix/store/yfh9gvgdibkfn8mh09n58q1wyw84vnk8-python3.14-ceph-20.2.2.drv
/nix/store/byrjibkx2vrh7w1dcqnqjpxxclwl9x1g-ceph-20.2.2.drv
so that seems fine.
| '#include "arrow/util/span.h"' \ | ||
| '#include <span>' | ||
|
|
||
| sed -i "1i #include <memory> include <span>" src/s3select/include/internal_file_decryptor_20.h |
1b9cdcb to
cfbc5b2
Compare
|
|
@GaetanLepage I see your |
|
It was probably just flaky. It's actually building fine. |
nh2
left a comment
There was a problem hiding this comment.
Generally looks good, and nicer than my PR
which I now closed in favour of this.
Maybe @benaryorg can also check it.
I don't like the commit messages
ceph: fix build
python3Packages.cython_0: cleanup, fix
as those could be written on a lot of commits.
It would be nicer if they if they said e.g.
ceph: fix build with arrow-cpp 24
python3Packages.cython_0: cleanup, fix Cython version
so that when looking at the history, one can see what a given commit was roughly about.
| @@ -98,9 +107,9 @@ buildPythonPackage rec { | |||
| setupHook = ./setup-hook.sh; | |||
|
|
|||
| meta = { | |||
| changelog = "https://github.com/cython/cython/blob/${version}/CHANGES.rst"; | |||
| changelog = "https://github.com/cython/cython/blob/${finalAttrs.src.tag}/CHANGES.rst"; | |||
There was a problem hiding this comment.
Not sur if this is good; if somebody overrides this from a src tag declaration to e.g. rev for a commit, this will fail to eval.
That seems worse than making a wrong link.
| '__version__ = "${finalAttrs.version}"' | ||
| ''; | ||
|
|
||
| nativeBuildInputs = [ |
There was a problem hiding this comment.
Why did you move these lines further down?
If that's not needed, keeping them were they were would make the diff smaller.
There was a problem hiding this comment.
@GaetanLepage Note the moving-around of lines is still in in the latest push.
| "test_valid_addr" | ||
| ]; | ||
|
|
||
| # importlib.metadata.PackageNotFoundError: No package metadata was found for ceph-common |
There was a problem hiding this comment.
I first intended to ask whether a drawback of that wouldn't be ambiguous build output such as
these 12 derivations will be built:
/nix/store/123...-ceph-20.nix
/nix/store/456...-ceph-20.nix
where you cannot tell the C++ from the Python build easily, and it looks like 2 big Ceph builds, but then I found it is already rendered differently:
/nix/store/yfh9gvgdibkfn8mh09n58q1wyw84vnk8-python3.14-ceph-20.2.2.drv
/nix/store/byrjibkx2vrh7w1dcqnqjpxxclwl9x1g-ceph-20.2.2.drv
so that seems fine.
dotlambda
left a comment
There was a problem hiding this comment.
ceph-python: skip metadata check is an outdated commit message. There is also no package called ceph-python.
| '#include "arrow/util/span.h"' \ | ||
| '#include <span>' | ||
|
|
||
| sed -i '1i #include <span>' src/s3select/include/internal_file_decryptor_20.h |
There was a problem hiding this comment.
That's quite brittle. Aren't we better off vendoring a patch?
There was a problem hiding this comment.
I first thought to comment whether we should have a grep that checks it's not already present, but then didn't since the other changes that go along with it have --replace-fail and will fail loudly once ceph updates, this seems OK.
| '__version__ = "${finalAttrs.version}"' | ||
| ''; | ||
|
|
||
| nativeBuildInputs = [ |
There was a problem hiding this comment.
setuptools belongs in
| nativeBuildInputs = [ | |
| build-system = [ |
but what's the point of moving this stuff around in a package that we should drop anyway?
There was a problem hiding this comment.
I clean things as I go. Didn't know this is about to be dropped.
There was a problem hiding this comment.
It's not but we should eventually drop cython_0, especially since it doesn't work on Python 3.13+.
| ncurses | ||
| ]; | ||
|
|
||
| env.LC_ALL = "en_US.UTF-8"; |
There was a problem hiding this comment.
The question really was "is this still needed", but there was no answer on whether it actually is. So, is it? If no, why not? Why is this there in the first place?
It is silly that there are 29 occurrences in nixpkgs of this, 28 without comments. Commits like 74fa186 add it without comment, and then commits like b402b81 remove it without commit message why it isn't needed anymore. Nixpkgs really needs better comment culture, otherwise we're just cargo-culting copy-pasting code snippets around without being able to know immediately what they are good for.
Props to @paparodeo who in commit 01299c0 actually commented what this is good for.
So from the above-mentioned b402b81 it sounds like that may not be needed anymore, but the commit message doesn't say if it isn't needed because Darwin or what changed in general, or if it isn't needed anymore for that specific package. I don't have Darwin, so I can't really check. Thus, and to keep the fix minimal, I will re-instantiate this line, given that as mentioned in #548582 (comment) cython_0 will be dropped in the future anyway.
There was a problem hiding this comment.
First disclaimer: I am by and large only looking at the Ceph changes, not e.g. at the Cython parts because I am not familiar enough with those to say much about them.
Second disclaimer: I have not yet built or tested any of this, however if the tests pass for other people that's fine by me. I'm still shaving some yaks and will hopefully get to test this patch eventually.
Looking at the latest version of the proposed changes it looks like the arrow-cpp changes have been moved into a patch rather than invoking sed during the build, which is a change I approve of, since this will cause failures in case the patch fails to apply.
some more (fully optional) opinions on the patch
I guess if the patch were to use some sort of conditional on the version of arrow it could be made to use something like the C++ equivalent of a typedef for the span so it would work with both versions, and could then be upstreamed.
However I fully understand if you don't want to go the extra mile here, this patch is great and I appreciate it as-is as it allows us to use the newer arrow-cpp version.
Edit: I also agree on the commit messages; they could be a tad more verbose (and ideally include a body explaining the rationale, in addition to just the subject line).
| buildPythonPackage (finalAttrs: { | ||
| pname = "cython"; | ||
| version = "0.29.37.1"; | ||
| version = "0.29.37"; |
There was a problem hiding this comment.
What is the benefit of downgrading the version from .1 to the commit just before?
The only difference seems to be in .github/workflows/: cython/cython@0.29.37...0.29.37.1
There was a problem hiding this comment.
Ah, I get it now. That change fixes the
Executing pythonMetadataCheckPhase
The 'cython' derivation has version '0.29.37.1' but .dist-info/METADATA specifies version '0.29.37'.
error. The .1 cython upstream release is "broken" because it bumpted the version but didn't udpate that file. That should really be in the commit message.
|
I have taken the liberty to force-push into this PR the not-yet-done small fixes from the review above (better commit messages, removal of permuting declaration order). I am OK to merge this now to unblock ceph, especailly since the |
|
Seems tolearble. I got a filestore VM test timeout though: |
Fixes error:
Executing pythonMetadataCheckPhase
The 'cython' derivation has version '0.29.37.1' but .dist-info/METADATA specifies version '0.29.37'.
The only upstream code is in `.github/workflows/`:
cython/cython@0.29.37...0.29.37.1
But the `.1` cython upstream release is "broken" in this regard because it bumped
the version but didn't udpate that file.
Also use `finalAttrs` for better overridability.
|
|
@GaetanLepage Did you repro or fix the test failure from #548582 (comment) ? |
…timing out Fixes NixOS#548582 (comment) Assisted-by: Claude Opus 5 in Zoo Code, human review
Fix: |
I don't use this program, sorry. So no.
Thanks! |
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.