Compare commits
10 commits
a27823acd5
...
6b75eb0f2c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b75eb0f2c | ||
|
|
0beb9f6d5c | ||
|
|
189cb17e34 | ||
|
|
bd4c4bb5f0 | ||
|
|
974a705e6b | ||
|
|
b62838cc75 | ||
|
|
370c63fadb | ||
|
|
c23d7b011e | ||
|
|
bd6cfb1e33 | ||
|
|
3475e61487 |
12 changed files with 62 additions and 32 deletions
|
|
@ -24,3 +24,6 @@ c758de9d22506eb279c5abe61f621e5c8f61af95
|
|||
|
||||
# style: format entire depot with nixpkgs-fmt
|
||||
aa122cbae78ce97d60c0c98ba14df753d97e40b1
|
||||
|
||||
# style: Switch to nixfmt from nixpkgs-fmt
|
||||
91d02d8c845d4ffbeefc7d99ef36b2234d87813b
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ in
|
|||
|
||||
nixpkgs.hostPlatform = lib.mkForce "x86_64-linux";
|
||||
|
||||
# kept as-is because we don't want to relabel historical metrics
|
||||
networking.hostName = "tvix-cache";
|
||||
|
||||
systemd.network.networks."10-uplink".networkConfig.Address = "2a01:4f9:3071:1091::2/64";
|
||||
|
|
|
|||
|
|
@ -53,18 +53,19 @@ rec {
|
|||
) (throw "${hostname} is not a known NixOS host") (map nixosFor depot.ops.machines.all-systems));
|
||||
|
||||
# Systems that should be built in CI
|
||||
archivistEC2System = nixosFor depot.ops.machines.archivist-ec2;
|
||||
gerrit01System = nixosFor depot.ops.machines.gerrit01;
|
||||
public01System = nixosFor depot.ops.machines.public01;
|
||||
build01System = nixosFor depot.ops.machines.build01;
|
||||
meta01System = nixosFor depot.ops.machines.meta01;
|
||||
nixosSnixCacheSystem = nixosFor depot.ops.machines.snix-cache;
|
||||
archivistEC2System = (nixosFor depot.ops.machines.archivist-ec2).system;
|
||||
build01System = (nixosFor depot.ops.machines.build01).system;
|
||||
gerrit01System = (nixosFor depot.ops.machines.gerrit01).system;
|
||||
meta01System = (nixosFor depot.ops.machines.meta01).system;
|
||||
public01System = (nixosFor depot.ops.machines.public01).system;
|
||||
snixCacheSystem = (nixosFor depot.ops.machines.snix-cache).system;
|
||||
|
||||
meta.ci.targets = [
|
||||
"archivistEC2System"
|
||||
"gerrit01System"
|
||||
"public01System"
|
||||
"build01System"
|
||||
"gerrit01System"
|
||||
"meta01System"
|
||||
"public01System"
|
||||
"snixCacheSystem"
|
||||
];
|
||||
}
|
||||
|
|
|
|||
4
snix/Cargo.lock
generated
4
snix/Cargo.lock
generated
|
|
@ -3473,9 +3473,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "redb"
|
||||
version = "2.4.0"
|
||||
version = "2.6.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea0a72cd7140de9fc3e318823b883abf819c20d478ec89ce880466dc2ef263c6"
|
||||
checksum = "59b38b05028f398f08bea4691640503ec25fcb60b82fb61ce1f8fd1f4fccd3f7"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"log",
|
||||
|
|
|
|||
|
|
@ -14092,9 +14092,9 @@ rec {
|
|||
};
|
||||
"redb" = rec {
|
||||
crateName = "redb";
|
||||
version = "2.4.0";
|
||||
edition = "2021";
|
||||
sha256 = "1ik3y8pdqrh4i378kv3qshh9r0dz7a43p0hqwg1rzpj0f76p42pa";
|
||||
version = "2.6.2";
|
||||
edition = "2024";
|
||||
sha256 = "1xykri7izzgqw4fbcbxqc35mzhiya101csd4pq48yfcg082qpcsr";
|
||||
type = [
|
||||
"cdylib"
|
||||
"rlib"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ proptest = { version = "1.5.0", default-features = false }
|
|||
prost = "0.13.1"
|
||||
prost-build = "0.13.1"
|
||||
quote = "1.0.37"
|
||||
redb = "2.1.2"
|
||||
redb = "2.6.2"
|
||||
regex = "1.10.6"
|
||||
reqwest = { version = "0.12.7", default-features = false }
|
||||
reqwest-middleware = { version = "0.4.1", default-features = false }
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ let
|
|||
}
|
||||
|
||||
# Upload all NAR files (with some parallelism).
|
||||
# As mkBinaryCache produces them xz-compressed, unpack them on the fly.
|
||||
# As mkBinaryCache produces them zstd-compressed, unpack them on the fly.
|
||||
# nar-bridge doesn't care about the path we upload *to*, but a
|
||||
# subsequent .narinfo upload need to refer to its contents (by narhash).
|
||||
echo -e "Uploading NARs… "
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ use prost::Message;
|
|||
use redb::{Database, TableDefinition};
|
||||
use std::{path::PathBuf, sync::Arc};
|
||||
use tonic::async_trait;
|
||||
use tracing::{instrument, warn};
|
||||
use tracing::{info, instrument, warn};
|
||||
|
||||
use super::{
|
||||
Directory, DirectoryGraph, DirectoryPutter, DirectoryService, LeavesToRootValidator,
|
||||
|
|
@ -41,7 +41,15 @@ impl RedbDirectoryService {
|
|||
}
|
||||
|
||||
let db = tokio::task::spawn_blocking(|| -> Result<_, redb::Error> {
|
||||
let db = redb::Database::create(path)?;
|
||||
let mut db = redb::Database::builder()
|
||||
.create_with_file_format_v3(true)
|
||||
.create(path)?;
|
||||
|
||||
// Upgrade redb database file format.
|
||||
if db.upgrade()? {
|
||||
info!("Upgraded database format");
|
||||
};
|
||||
|
||||
create_schema(&db)?;
|
||||
Ok(db)
|
||||
})
|
||||
|
|
@ -55,8 +63,9 @@ impl RedbDirectoryService {
|
|||
|
||||
/// Constructs a new instance using the in-memory backend.
|
||||
pub fn new_temporary() -> Result<Self, Error> {
|
||||
let db =
|
||||
redb::Database::builder().create_with_backend(redb::backends::InMemoryBackend::new())?;
|
||||
let db = redb::Database::builder()
|
||||
.create_with_file_format_v3(true)
|
||||
.create_with_backend(redb::backends::InMemoryBackend::new())?;
|
||||
|
||||
create_schema(&db)?;
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,12 @@ impl From<redb::CommitError> for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<redb::UpgradeError> for Error {
|
||||
fn from(value: redb::UpgradeError) -> Self {
|
||||
Error::StorageError(value.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
impl From<std::io::Error> for Error {
|
||||
fn from(value: std::io::Error) -> Self {
|
||||
if value.kind() == std::io::ErrorKind::InvalidInput {
|
||||
|
|
|
|||
|
|
@ -906,14 +906,15 @@ impl Compiler<'_, '_> {
|
|||
/// Compile conditional expressions using jumping instructions in the VM.
|
||||
///
|
||||
/// ```notrust
|
||||
/// ┌────────────────────┐
|
||||
/// │ 0 [ conditional ] │
|
||||
/// │ 1 JUMP_IF_FALSE →┼─┐
|
||||
/// │ 2 [ main body ] │ │ Jump to else body if
|
||||
/// ┌┼─3─← JUMP │ │ condition is false.
|
||||
/// Jump over else body ││ 4 [ else body ]←┼─┘
|
||||
/// if condition is true.└┼─5─→ ... │
|
||||
/// └────────────────────┘
|
||||
/// ┌─────────────────────┐
|
||||
/// │ 0 [ conditional ] │
|
||||
/// │ 1 JUMP_IF_CATCH →┼───┐ Jump over else body
|
||||
/// │ 2 JUMP_IF_FALSE →┼─┐ │ if condition is catchable.
|
||||
/// │ 3 [ main body ] │ │ ← Jump to else body if
|
||||
/// ┌┼─4─← JUMP │ │ ← condition is false.
|
||||
/// Jump over else body ││ 5 [ else body ] ←┼─┘ │
|
||||
/// if condition is true.└┼─6─→ ... ←┼───┘
|
||||
/// └─────────────────────┘
|
||||
/// ```
|
||||
fn compile_if_else(&mut self, slot: LocalIdx, node: &ast::IfElse) {
|
||||
self.compile(slot, node.condition().unwrap());
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ use snix_castore::{
|
|||
use std::{path::PathBuf, sync::Arc};
|
||||
use tokio_stream::wrappers::ReceiverStream;
|
||||
use tonic::async_trait;
|
||||
use tracing::{instrument, warn};
|
||||
use tracing::{info, instrument, warn};
|
||||
|
||||
const PATHINFO_TABLE: TableDefinition<[u8; 20], Vec<u8>> = TableDefinition::new("pathinfo");
|
||||
|
||||
|
|
@ -40,7 +40,15 @@ impl RedbPathInfoService {
|
|||
}
|
||||
|
||||
let db = tokio::task::spawn_blocking(|| -> Result<_, redb::Error> {
|
||||
let db = redb::Database::create(path)?;
|
||||
let mut db = redb::Database::builder()
|
||||
.create_with_file_format_v3(true)
|
||||
.create(path)?;
|
||||
|
||||
// Upgrade redb database file format.
|
||||
if db.upgrade()? {
|
||||
info!("Upgraded database format");
|
||||
};
|
||||
|
||||
create_schema(&db)?;
|
||||
Ok(db)
|
||||
})
|
||||
|
|
@ -54,8 +62,9 @@ impl RedbPathInfoService {
|
|||
|
||||
/// Constructs a new instance using the in-memory backend.
|
||||
pub fn new_temporary(instance_name: String) -> Result<Self, Error> {
|
||||
let db =
|
||||
redb::Database::builder().create_with_backend(redb::backends::InMemoryBackend::new())?;
|
||||
let db = redb::Database::builder()
|
||||
.create_with_file_format_v3(true)
|
||||
.create_with_backend(redb::backends::InMemoryBackend::new())?;
|
||||
|
||||
create_schema(&db)?;
|
||||
|
||||
|
|
|
|||
2
third_party/sources/sources.json
vendored
2
third_party/sources/sources.json
vendored
|
|
@ -87,7 +87,7 @@
|
|||
"nix-gerrit": {
|
||||
"branch": "main",
|
||||
"repo": "https://git.lix.systems/the-distro/nix-gerrit.git",
|
||||
"rev": "b730594c169cf14dd9c258902d58e8bb7709501f",
|
||||
"rev": "1fdef9c8c8c876f410b75b0c4220ad8221572ef8",
|
||||
"type": "git"
|
||||
},
|
||||
"nixpkgs": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue