Repository navigation
buildstream-plugins: Use finalAttrs pattern, fix meta.changelog - #510073
Conversation
87ee646 to
678d89b
Compare
meta.platforms to BuildStream'smeta.platforms to BuildStream's and use finalAttrs.
678d89b to
20e3939
Compare
20e3939 to
31c5925
Compare
31c5925 to
624087d
Compare
|
@SuperSandro2000 Depending on when this PR is ready for merge,, and gets merged, I'd like to backport it to 25.11, but I don't have that privilege, as its a |
624087d to
4914d3d
Compare
4914d3d to
0c2923c
Compare
0c2923c to
e61f923
Compare
1f55945 to
fb9c6b0
Compare
fb9c6b0 to
08320b4
Compare
08320b4 to
d912dfd
Compare
|
Using |
@Skyb0rg007 I think to unblock this MR, I'll revert the |
d912dfd to
0c4de1a
Compare
meta.platforms to BuildStream's and use finalAttrs.finalAttrs and set meta.changelog attribute
70fd03c to
11550a4
Compare
finalAttrs, fix buildstream dependency, and enable testsfinalAttrs pattern, fix meta.changelog
|
@Skyb0rg007 I agree with your comments. Some tests need to be disabled until upstream fix it - I'll raise this when I return to the office. As for the other comments, I think we can solve a majority by using VM tests. This is something now being worked on. I will also get the same done in the |
|
Opened #567698 as a complementary way to run |
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path via setuid `fusermount3` -- neither of which the Nix build sandbox provides. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse and fusermount3 access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
|
@SuperSandro2000 following up on your CHANGES_REQUESTED review from 2026-05-06 — the |
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
11550a4 to
93bd5cc
Compare
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
93bd5cc to
1ad5823
Compare
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
93bd5cc to
1ad5823
Compare
Also fixes the `meta.changelog` attribute, which pointed at a nonexistent release-tag page; use the NEWS file at the tag instead.
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
1ad5823 to
06feda8
Compare
The upstream pytest suite needs `buildstream` present (including its shared source-plugin test helpers and templated repo-kind tests) and needs buildbox-casd's real FUSE-based staging, which needs `/dev/fuse` and a working mount path that the Nix build sandbox doesn't provide. Add nixosTests.buildstream-plugins-community and point passthru.tests.pytest at it instead: programs.fuse.enable gives real /dev/fuse access, so the suite exercises the actual FUSE-backed staging path. `buildstream`'s own `bst` entry point bakes its dependencies' site-packages directories into that script rather than exposing them under its own site-packages directory, so `toPythonModule` is used to pull `buildstream` and its dependencies into a shared environment that `pytest` can import from. Deselect the handful of tests that reach out to gitlab.com for real network fetches (bazel/bazel_file manifest downloads, the git-lfs test repo), since network access isn't available in the test VM either. Also deselect the shared repo-kind tests pulled in from buildstream._testing._sourcetests via sourcetests_collection_hook: pytest-datafiles copies their datafiles fixtures from buildstream's own installed (Nix-store-read-only) package data, preserving the missing write bit, so code that writes into the copy fails with PermissionError. This is the same upstream bug as apache/buildstream#2196 (see also PR NixOS#510073 for the same fix in the sibling buildstream-plugins package), and isn't specific to the build sandbox, so it still applies in the VM. Assisted-by: Claude <[email protected]>
We switch to using
finalAttrsfor referring to declared attributes within the derivation, and fix themeta.changelogattribute, which pointed at a nonexistent GitHub Release for this tag; it now points at theNEWSfile at the tag instead.Note
This was produced with the assistance of an LLM (Claude Code, model claude-sonnet-5), reviewed and taken responsibility for by me. See the
Assisted-bytrailer on the commit.Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.