This points our own gerrit check to the deployed buildkite-api-proxy,
updates the URL and stops sending an outdated token.
Fixes#118.
Change-Id: Ic7ace4d67a6bd05c408ac14fe988ae3fe829a49b
Reviewed-on: https://cl.snix.dev/c/snix/+/30406
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: edef <edef@edef.eu>
This is a read-only Buildkite token, it was generated and installed by
flokli@ and has read_builds, read_build_logs, and read_pipelines
permissions.
Part of #118.
Change-Id: I0bbfbab9ad1152ff8e781b7380f44d3cd7245bab
Reviewed-on: https://cl.snix.dev/c/snix/+/30404
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: edef <edef@edef.eu>
This provides a very simple http server, receiving a git sha1 and
querying the buildkite api for the status - the same that's previously
done by the frontend, but now without exposing the (read-only) token
to users.
We can add caching / rate-limiting if the need arises, for now we
just propagate the `cache-control` headers (which seem to be set at
"cache-control: max-age=0, private, must-revalidate" currently anyways)
Part of #118.
Change-Id: I8989a74cb2b278139d988089ff8d6e59e00969e4
Reviewed-on: https://cl.snix.dev/c/snix/+/30403
Reviewed-by: edef <edef@edef.eu>
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
besadii is called as `patchset-created` or `change-merged`, not
`ref-updated`.
Change-Id: I843f2d749ab152fb0061b6a9da44775ed58a9eae
Reviewed-on: https://cl.snix.dev/c/snix/+/30344
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
There is no point in separately checking lt/eq/gt separately when we
always need the full ordering anyway.
Change-Id: I993108029d205ac17f01acdb6dbf9b2f0cd80f28
Reviewed-on: https://cl.snix.dev/c/snix/+/30372
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
We can just iterate key-value pairs for our merge sort, rather than
relying on unsafe to get us the value without costing us a presence
check.
Change-Id: I7145a1b2f33a8510de8d7fbd1a12804517a78042
Reviewed-on: https://cl.snix.dev/c/snix/+/30371
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This blocks a bunch of AI scrapers from Forgejo, which seems to be
particularly attractive.
Especially meta-externalagent has been scraping very excessively.
The list comes from https://github.com/ai-robots-txt/ai.robots.txt,
let's see how often this needs updating.
Change-Id: I55ae7c42c6a3eeff6f0457411a8b05d55cb24f65
Reviewed-on: https://cl.snix.dev/c/snix/+/30370
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: edef <edef@edef.eu>
Without this, the website just shows a white page with a "This line is
from …" message. Downgrading hugo to 0.145.0 fixes it.
Change-Id: I5a4e2b5d00d3772580daf8d863375471979a5825
Reviewed-on: https://cl.snix.dev/c/snix/+/30368
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Bence Nemes <nemes.bence1@gmail.com>
Tested-by: besadii
This doesn't seem to do anything, and logs a warning on startup.
Change-Id: I4d883f2a95d5934bc3dc2998a497f3c2a8ff857d
Reviewed-on: https://cl.snix.dev/c/snix/+/30364
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
Tested-by: besadii
It seems this now gets added automatically, and causes nginx to fail
with an emergency due to the directive being there two times.
Drop one of it, which gets nginx to boot up again.
Change-Id: I0df3c2f7c2cfbe23d717249570d5a4d1a7fe2f2b
Reviewed-on: https://cl.snix.dev/c/snix/+/30363
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
grafana-agent has been removed, but the failing eval was missed due
to #80.
Change-Id: I87cfc71c8c98e27e32f4e95e4d85901195cb5b75
Reviewed-on: https://cl.snix.dev/c/snix/+/30347
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
Tested-by: besadii
This was missed, due to #80.
Change-Id: I3b10fa615c09fdd9887c63c847cfd70f5a80d277
Reviewed-on: https://cl.snix.dev/c/snix/+/30346
Tested-by: besadii
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
Autosubmit: Florian Klink <flokli@flokli.de>
This option is not used, we can reintroduce it when needed.
Change-Id: Ie0f90ea7fc84f493f0c73de29ddf200c1184cb40
Reviewed-on: https://cl.snix.dev/c/snix/+/30345
Tested-by: besadii
Reviewed-by: Ryan Lahfa <masterancpp@gmail.com>
Autosubmit: Florian Klink <flokli@flokli.de>
Add a rustfmt.toml to all the crates that are already migrated to
edition 2024.
Initially proposed in cl/30341.
Fixes#115.
Change-Id: I9f58cd45e38fec3acbb077492d5402e30560996b
Reviewed-on: https://cl.snix.dev/c/snix/+/30343
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Domen Kožar <domen@cachix.org>
There already is a rustfmt.toml in the depot root specifying the edition.
Removing the option enables projects in the depot to update to newer
editions independently.
Fixes: https://b.tvl.fyi/issues/442
Change-Id: I15d30f69040a4ec327fd099c508e5c11cec2aecc
Reviewed-on: https://cl.tvl.fyi/c/depot/+/13347
Reviewed-by: thk <thomas@koch.ro>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-on: https://cl.snix.dev/c/snix/+/30342
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Domen Kožar <domen@cachix.org>
We only really want to report progress when something takes a meaningful
time, and that's only while eval.evaluate is called.
We also don't want to show progress bars when
--dump-bytecode or --trace-runtime is enabled.
Even with the changes in cl/30234 not clobbering progress bars, having
progress bars interleaved with other lines from these observers is not
helpful.
Fixes#84 and #113.
Change-Id: I853d7f69757250afaa38e0b172b0c0186bf655a0
Reviewed-on: https://cl.snix.dev/c/snix/+/30337
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Bence Nemes <nemes.bence1@gmail.com>
This adds bornhack.dk as an OIDC provider.
We currently do not yet map the `nickname` claim as a username field.
This means users logging in via Bornhack need to choose their username
manually, until https://github.com/bornhack/bornhack-website/issues/1837
is solved.
Change-Id: Ia91594107a0cd1d1e0a2ee7ca48d603a2ac681a5
Reviewed-on: https://cl.snix.dev/c/snix/+/30326
Tested-by: besadii
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: Florian Klink <flokli@flokli.de>
* Update Snix' verify-lang-tests to 2.28, as 2.25 has been removed
from nixpkgs
* Update snix/cli integration tests, iso_gnome is called iso_graphical
(again?)
* Address clippy lints
* Regenerate go bindings
* Remove grpc-health-check from our overlay, it's long been merged
Change-Id: I9d33cabdd3e7065a1f28bcccf4f979f08a456f88
Reviewed-on: https://cl.snix.dev/c/snix/+/30333
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
build-go and store-go currently are skipped from CI until someone finds
time to work on https://git.snix.dev/snix/snix/issues/60.
We can however still regenerate the bindings at least, so do this.
Change-Id: I626da69f26bff24cdf3c01581931045a44635116
Reviewed-on: https://cl.snix.dev/c/snix/+/30335
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
We don't want readTree to descent inside web/, especially not in the
node_modules directory that might be present in local checkouts.
Change-Id: Ia1c2147a76f22560947d367f4e94e4c91bb66512
Reviewed-on: https://cl.snix.dev/c/snix/+/30334
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Use the all-caps version, like in other places of the docs.
Change-Id: I74a21f9015ba128456f6ee0b652ad12056b4e88b
Reviewed-on: https://cl.snix.dev/c/snix/+/30329
Autosubmit: Florian Klink <flokli@flokli.de>
Tested-by: besadii
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Fix the broken link to PathComponent.
Write `[BLAKE3][]` instead of just `[BLAKE3]` to be consistent with
other links.
Change-Id: If8651de9d2401a81e47281216707e442b5ff1932
Reviewed-on: https://cl.snix.dev/c/snix/+/30328
Tested-by: besadii
Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com>
Autosubmit: Florian Klink <flokli@flokli.de>
This returns as a [PathComponent], not as bytes.
Change-Id: Ia6df19be6f3060b28f8be6b74f3f3f443a536f8a
Reviewed-on: https://cl.snix.dev/c/snix/+/30327
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: besadii
Also restructure this, explaining the Rust data types, and then
explaining the differences with the proto implementation, which uses
"entry" since cl/30296.
Change-Id: Ie264ab60998f0d891b4a4ea680a2d9dbe1c5929e
Reviewed-on: https://cl.snix.dev/c/snix/+/30314
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Domen Kožar <domen@cachix.org>
Tested-by: besadii
Restrict the CLI to only root directories, passing the blake3 digest of
the root directory.
Usually we want to serve a directory, and we now have a `snix-castore
ingest` sucommand, and copying the output from that command is much less
effort than constructing a proto message.
More advanced usecases can still use the get_root_node_contents library
function and pass in other nodes.
Change-Id: I66c2c0a15723b43b5b0cffc1c201391df57dd602
Reviewed-on: https://cl.snix.dev/c/snix/+/30321
Reviewed-by: Stefan Junker <mail@stefanjunker.de>
Tested-by: besadii
respond_file only uses requested_path to (only) calculate an extension
for mime type guessing, and getting to there is a bit messy.
Use PathComponent::extension to get the extension, and replace
`requested_path: Option<std::path::Path>` with
`extension: Option<&str>`.
Change-Id: I0582a1127f8b505fdf77406fafb3d3b206d694f2
Reviewed-on: https://cl.snix.dev/c/snix/+/30320
Tested-by: besadii
Reviewed-by: Stefan Junker <mail@stefanjunker.de>
This returns the extension, similar to the method we already have for
PathComponent.
Change-Id: Ia1719951c453c196beb991686dbee23bae1049af
Reviewed-on: https://cl.snix.dev/c/snix/+/30322
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Stefan Junker <mail@stefanjunker.de>
Tested-by: besadii
This returns the file extension.
Change-Id: I488cbadbce027a37d53cee808bcf7a95283ed07d
Reviewed-on: https://cl.snix.dev/c/snix/+/30319
Tested-by: besadii
Reviewed-by: Domen Kožar <domen@cachix.org>
Reviewed-by: Stefan Junker <mail@stefanjunker.de>
The castore-http crate provides both a binary and a library interface to
serve a single castore root node over HTTP.
The library function `get_root_node_contents` will return a
`axum::Response` for a requested path in the castore root node
depending on the requested paths type.
If the requested path in the root node is a directory, we return:
- a index file if there is a file matching one of the configurable
`index_names`
- a directory listing, if no `index_names` were configured and
`auto_index` was enabled
- the FORBIDDEN status code if no `index_names` were set nor
`auto_index` was enabled
If the requested path in the root node is a file,
we return the file.
If the requested path in the root node is a symlink,
we figure out wether the target exists and return a REDIRECT.
If the requested path doesn't exist in the root node,
we respond with NOT_FOUND
The binary wraps this functionality and allows one to specify the
desired root node by providing its base-64 encoded representation as
well as the other configuration parameters affecting the behavior of
`get_root_node_contents`.
Change-Id: I737482299f788ec0244c54b52042f9eb655a05c2
Reviewed-on: https://cl.snix.dev/c/snix/+/30245
Autosubmit: Marijan Petričević <marijan.petricevic94@gmail.com>
Reviewed-by: Marijan Petričević <marijan.petricevic94@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
This is similiar to `result` and should not be added to the repo.
Change-Id: Id700af309baf002d1dfb4798a446a74011437e2d
Reviewed-on: https://cl.snix.dev/c/snix/+/30313
Reviewed-by: Florian Klink <flokli@flokli.de>
Autosubmit: Ilan Joselevich <personal@ilanjoselevich.com>
Tested-by: besadii
Thanks to cl/30305, we don't have broken references in the rust docs anymore.
Enforce for it to stay this way, by making the //snix:rust-docs target
fail if there's broken references.
References to private items (which we still have) are logged as
warnings.
Change-Id: I06e6fe3bec3d0c4e6af910685f9cd0650e67dc5c
Reviewed-on: https://cl.snix.dev/c/snix/+/30312
Tested-by: besadii
Autosubmit: Florian Klink <flokli@flokli.de>
Reviewed-by: Bence Nemes <nemes.bence1@gmail.com>
We previously used to calculate the transitive input closure of builds
using eval state, i.e. based on known_paths from the drv that is being
built. This caused had 2 issues:
* The build included a lot of unnecessary build time dependencies of drv's that
the build depends on in addition to runtime dependencies.
* Some runtime dependencies were missing causing the build to fail, see #106
This implementation uses only runtime dependencies of direct
dependencies and makes sure to include any transitive runtime dependencies,
this is achieved by querying path_info_service for "references".
fixed#106
Change-Id: Id734bed7b0cf50e2dac96501a9bc70655ed15054
Reviewed-on: https://cl.snix.dev/c/snix/+/30308
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
builtins.toXML relies on attr keys being sorted, which is an
implementation detail.
Cppnix creates sorted xml, and tests expect it too, so changed that
iter call site.
builtins.attrNames and attrValues should also returns sorted lists, so
changed that too.
Change-Id: Ic706afc6855d5d28932ade7482449c965b0ae94f
Reviewed-on: https://cl.snix.dev/c/snix/+/30307
Reviewed-by: Florian Klink <flokli@flokli.de>
Tested-by: besadii
This is a small utility that allows ingesting a given path or .tar
file content into the snix-castore and returns the B3Digest of the
root node. Another subcommand takes this hash to mount the content
back as a virtiofs or FUSE drive.
This works as-is, but I discovered issue #107 while working on it.
Change-Id: I11df73e39ab0db6f3868effab9bde4f090eadcb5
Reviewed-on: https://cl.snix.dev/c/snix/+/30293
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>