This creates a mkCargoBuild function of the shared bits from clippy and
rust-docs uses it for those targets.
Change-Id: I44f9f2b319ea4ef1d1236feabdf726f0256d5d70
Reviewed-on: https://cl.snix.dev/c/snix/+/30647
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Brian Olsen <brian@maven-group.org>
Tested-by: besadii
- Update Forgejo from 11.0.1 to 12.0.1, match upstream (see #80, cl 30121).
- Re-vendor and refresh Gerrit integration patches from lix to restore compatibility (patches broke @ cl 30628).
- Update dead emoji asset links to new locations, borrowed from lix infra (old URLs 404'd).
- Fixes build failure for ops.nixos.public01System (#169).
Context:
- Forgejo build broke after nixpkgs channel bump (cl 30628) due to outdated patches (#169).
- Emoji assets previously fetched from volpeon.ink are now archived or moved; new URLs and hashes are from lix infra.
- Gerrit patches are yoinked from lix again to restore code review tab and Gerrit CL linking (thanks emilylange).
Closes: #169
Refs: #80
Change-Id: I6a6a696423a6360b4056892e171df2baf6fa7206
Reviewed-on: https://cl.snix.dev/c/snix/+/30645
Tested-by: besadii
Autosubmit: Oleksandr Knyshuk <olk@disr.it>
Reviewed-by: Florian Klink <flokli@flokli.de>
- Extend the notification template to handle `wip-state-changed` events where a change is undrafted (i.e., `.Change.Wip` is false or not present).
- Add test cases for undrafting (should notify) and re-drafting (should not notify).
- Ensure correct handling of `.Changer.Username` for undraft notifications.
- Update Go module dependencies for test coverage. (`go mod tidy`)
This allows the IRC bot to notify when a change is moved out of
WIP/draft state, improving visibility for ready-for-review CLs.
Fixes#167.
Change-Id: I6a6a69642369726c3bd9f523ae025c34dba8c4aa
Reviewed-on: https://cl.snix.dev/c/snix/+/30641
Reviewed-by: Oleksandr Knyshuk <olk@disr.it>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Closes#114
Removes the per-crate rustfmt configs, sets default edition to 2024.
This should fix the formatting issues between some editors and CI.
Change-Id: I9bb3a5f49f8ba2c8a616f29e87b7f8093187a165
Reviewed-on: https://cl.snix.dev/c/snix/+/30595
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Update the zstd crate from version 0.9.0 to 0.13.0, removing the TODO
comment blocking the upgrade. The dependency update also includes
related bumps to zstd-safe and zstd-sys crates, along with the
addition of pkg-config as a new transitive dependency.
Change-Id: I6a6a696459075f5ee56f448e87286b6ec39b26d3
Reviewed-on: https://cl.snix.dev/c/snix/+/30640
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Part of #114
There were a lot of warnings about drop order change. They are triggered
by NixString's custom drop, but the drop doesn't have side effects so
they can be ignored.
Change-Id: I19071de0fd39b8f0d19abc917d1d89d1cf26de40
Reviewed-on: https://cl.snix.dev/c/snix/+/30592
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: besadii
Abstracts enviornment access to the IO trait.
It also replaces the unsafe set_var in the test harness.
Change-Id: I3908f2d3cc4392ad2f5bc843c4de63382b692dfd
Reviewed-on: https://cl.snix.dev/c/snix/+/30639
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This was still using substituteAll, which got removed in the following
nixpkgs bump.
Change-Id: Ia07e2fce8a405973234f2c0d247579f68679446c
Reviewed-on: https://cl.snix.dev/c/snix/+/30629
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
Passing around boxed errors here would be way more annoying, and we call
this once during database initialization.
Change-Id: I04e65dcc6fbdec591ef553bac9825f51a7d47991
Reviewed-on: https://cl.snix.dev/c/snix/+/30633
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
We still need to unbox before calling ::with_interceptor, the proper fix
will be in https://github.com/hyperium/tonic/issues/2253.
Change-Id: I6de13de79e8ffd9d2f75268b7b232c2f6c91202d
Reviewed-on: https://cl.snix.dev/c/snix/+/30632
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
This broke in cl/11976 and cl/11983, the ::with_interceptor() calls
went missing.
Change-Id: Ic78a88d6c102d79da58fe45d5e595d3879c12af7
Reviewed-on: https://cl.snix.dev/c/snix/+/30631
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
This uses variables inside `format!()` strings directly,
and switches to using `std::io::Error::other(e.to_string())`
instead of std::io::Error::new(io::ErrorKind::Other, e.to_string()).
It also found an unnecessary `mut` in the test harness.
Change-Id: I406c709091e87ec64bfbdbcdc7f460af9b83d3bc
Reviewed-on: https://cl.snix.dev/c/snix/+/30630
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
patchset and change numbers are numbers in the JSON, trying to deserialize them into a string fails:
Jul 28 20:34:03 gerrit01 gerrit-webhook-to-irccat[2430441]: time=2025-07-28T20:34:03.675Z level=WARN msg="failed to parse body" error="json: cannot unmarshal number into Go struct field PatchSet.patchSet.number of type string"
Update our library dependency to a version containing the fixed types.
Also add tests for the three messages we care about.
Change-Id: Iac44e6ad01a8590b4cafa4d301c9f45000f335d0
Reviewed-on: https://cl.snix.dev/c/snix/+/30624
Tested-by: besadii
Reviewed-by: Ryan Lahfa <ryan@lahfa.xyz>
Reviewed-by: Jade Lovelace <jade@lix.systems>
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Florian Klink <flokli@flokli.de>
This was a workaround, the workaround is not needed anymore.
Change-Id: I4a839f3733ec6cb0a26ba87dadafe304ff5ccfbe
Reviewed-on: https://cl.snix.dev/c/snix/+/30603
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Yureka <snix@yuka.dev>
Tested-by: besadii
Snix is not provided as a josh workspace, this was only the case for
Tvix, while still in the TVL repo, so we can drop that entrypoint.
Change-Id: Iafc2a6520645e607f26bcf674a3d98b646f5c9f2
Reviewed-on: https://cl.snix.dev/c/snix/+/30601
Reviewed-by: Yureka <snix@yuka.dev>
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Lix does this and it has eliminated anyone ever having to think about
it; it just works.
Change-Id: I24a35d2d0b31f1245172d332bac40fe0b39dc2b9
Reviewed-on: https://cl.snix.dev/c/snix/+/30604
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
We found this bug in Lix's config and noticed Snix had the same bug; see
4b9e84fa0a
and b47965fe8f.
Change-Id: I65b14839a62c4e779136c1c34750d15cedaaddc8
Reviewed-on: https://cl.snix.dev/c/snix/+/30605
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
There's no point in replicating redundant information in many different
places. Add some more pointers and encouragement to read the docs where
they live.
Change-Id: I449101cfda7c8a728d3e2f3be71dee00be780ec3
Reviewed-on: https://cl.snix.dev/c/snix/+/30599
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
Autosubmit: Florian Klink <flokli@flokli.de>
Part of #114
The lock at `nix-compat/src/nix_daemon/handler.rs:186` gets released later, but
this doesnt seem to change behavior.
Change-Id: If871a090791740d98bca7a043e86af6a9b0c5463
Reviewed-on: https://cl.snix.dev/c/snix/+/30590
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Part of #114
This edition change doesn't affect these crates except for formatting.
Change-Id: I441c967b6803f1f839379c2ec13dee3f0958fb05
Reviewed-on: https://cl.snix.dev/c/snix/+/30593
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Part of #114
This edition change doesn't affect this crate except for formatting.
Change-Id: I8e2650f6de776658a14ee5a11bc7a63ad57fae89
Reviewed-on: https://cl.snix.dev/c/snix/+/30591
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Use entry.file_type() instead of entry.metadata().file_type() to avoid
unnecessary stat syscalls. The file_type() method uses the cached d_type
field from the readdir() syscall when available, eliminating the need
for additional filesystem access.
This matches the behavior described in https://github.com/NixOS/nix/pull/13412
where readDir should only read directory entries without stat'ing each file.
Change-Id: I8983f84a7cff28b2c892d5829b9880ed22be4389
Reviewed-on: https://cl.snix.dev/c/snix/+/30596
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Part of #114
This edition change doesn't affect this crate except for formatting.
Change-Id: Ia7adca8a62e3cb7cbc1187c539907be45a05ab4b
Reviewed-on: https://cl.snix.dev/c/snix/+/30589
Autosubmit: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This is useful for the cases when original urls no longer exist, but nixpkgs still references them.
Change-Id: Ibfbb6784876efe4fc8f65fac84ff9dcb72e78ff7
Reviewed-on: https://cl.snix.dev/c/snix/+/30570
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Vova Kryachko <v.kryachko@gmail.com>
We don't want to crash the evaluator when an invalid regex is passed,
but instead display a user-facing error message. This CL does that.
Change-Id: I81fd8e342fc877344f8d2a3704ef53caf5190aa3
Reviewed-on: https://cl.snix.dev/c/snix/+/30588
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
Tested-by: besadii
Reviewed-by: Bence Nemes <nemes.bence1@gmail.com>
Some analysing what is going on in nixpkgs revealed that we recompiled the same
regexes many times, and there aren't that many different regexes anyways.
This was actually visible in flamegraphs, now it's not anymore.
Fixes https://git.snix.dev/snix/snix/issues/151
Change-Id: Ia04b1833fec083017aebac99cdae7e91148966c4
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13464
Reviewed-by: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
(cherry picked from commit aa1eca36c3b3c18d96ba3081d7053b4c639e2f17)
Reviewed-on: https://cl.snix.dev/c/snix/+/30587
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Bence Nemes <nemes.bence1@gmail.com>
All these functions do blocking IO, and don't yield back to the
executor, so we cannot invoke them directly, but have to use
spawn_blocking and a channel.
Instead of plainly reverting cl/30575, this keeps potential errors being
sent as the last element of the stream.
We need to make our error construction a bit more ergonomic, potentially
allow them to wrap other errors instead of the madness this currently
is, but this is something for a later CL.
Change-Id: Ifb05871741813a389ac00b4f2c468f984a689a18
Reviewed-on: https://cl.snix.dev/c/snix/+/30586
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
Tested-by: besadii
fuse-backend-rs spawns multiple threads, but these don't automatically
inherit the tokio runtime context.
Spawning tasks from "the wrong thread" would then cause a panic, as seen
in https://git.snix.dev/snix/snix/issues/147.
However, cl/30575 didn't really fix this, it only removed one place
spawning tasks, without fixing the underlying issue.
PathInfoService / BlobService / DirectoryService are expected to spawn
tasks. We need to simply invoke `.enter()` from all worker threads, and
that's what this CL does.
An alternative would be to manually (re)-enter inside every function of
the FileSystem trait, but that'd be very messy.
A similar fix needs to end up in the virtiofs implementation, but we
don't have control over the (single) thread being spawned by
VhostUserDaemon there, so cannot just enter the runtime context there,
so virtiofs will stay broken for now.
Maybe it's time to re-architect this a bit - have our FileSystem impl
be little code and call to sync endpoints to do the actual work, which
is then handled by workers on another thread - but that's left for
another CL.
Change-Id: I58cdbd952f4ecc39bdc2f2fa69a788caa0cc78ba
Reviewed-on: https://cl.snix.dev/c/snix/+/30585
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
This is snix-castore, not snix-store.
Change-Id: I4c77adbc8c0c7c450075231ae4ef03ddfa0ea81c
Reviewed-on: https://cl.snix.dev/c/snix/+/30584
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
The types are different for `gerrit stream-events` and webhooks, so
switch to a fork of go-gerrit containing their definitions.
https://github.com/andygrunwald/go-gerrit/pull/189 is the upstream PR.
Change-Id: I24136af2f2cf5655f2a8278632a3b0f52aa6adcc
Reviewed-on: https://cl.snix.dev/c/snix/+/30544
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Changelog: https://www.gerritcodereview.com/3.12.html
We are skipping over the 3.11.1, 3.11.2, 3.11.3 minor releases which
remains available.
This bump was already tested on another Gerrit instance.
No manual intervention is required.
Change-Id: Ia3ce1f1cda36abe6da4edd4210260f664f7b3672
Signed-off-by: Raito Bezarius <raito@lix.systems>
Reviewed-on: https://cl.snix.dev/c/snix/+/30576
Autosubmit: Ryan Lahfa <ryan@lahfa.xyz>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Fixes a panic in `list` impl of PathInfoService for fuse/virtiofs:
```
thread 'vring_worker' panicked at store/src/pathinfoservice/redb.rs:136:9:
there is no reactor running, must be called from the context of a Tokio 1.x runtime
```
Closes#147.
Change-Id: I2bed5157b30fa185276dcaefd35277159a01fe2d
Reviewed-on: https://cl.snix.dev/c/snix/+/30575
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
the subgid maps are not mapped per group, but per user
Change-Id: Iaf367cff159109eefb5ef99d58033082e6151c5d
Reviewed-on: https://cl.snix.dev/c/snix/+/30568
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Vova Kryachko <v.kryachko@gmail.com>
All outputs constructed by derivation_to_build_request use inputs_dir as
a prefix (so we cannot use StorePath::from_bytes, which only takes
the basename), and they are relative to their root, so we cannot use
StorePath::from_absolute_path either.
Construct the store paths by stripping inputs_dir early (right after
the call to derivation_to_build_request), and use them later.
Change-Id: I3874e11cf21159c05b02314d9baf26cc98ea7956
Reviewed-on: https://cl.snix.dev/c/snix/+/30569
Reviewed-by: Yureka <snix@yuka.dev>
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
This change adds basic scaffolding to allow configuring hashed_mirrors that will be used
by fetchurl to download artifacts by their hash, this is useful in case certain URLs are
no longer available but required to bootstrap nixpkgs stdenv.
These urls will have higher priority than the url specified in fetchurl(and friends) and
will be attempted before falling back to the actual url specified in fetchurl.
Change-Id: I589bdef609075f274cbdf6b26af602cafaa7496a
Reviewed-on: https://cl.snix.dev/c/snix/+/30567
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>