diff --git a/.github/workflows/kanidm_book.yml b/.github/workflows/kanidm_book.yml index 26730bade..21f7d56fd 100644 --- a/.github/workflows/kanidm_book.yml +++ b/.github/workflows/kanidm_book.yml @@ -41,6 +41,8 @@ jobs: | awk '{print $1}' \ | sort -t. -k3n,3 -k4n,4 \ | awk -F'/' '{print $NF}' \ + | grep -E '^[[:digit:]]\.[[:digit:]]\.[[:digit:]]' \ + | sort -t. \ | tail -n1)" >> $GITHUB_OUTPUT id: branchname - name: Move redirector page diff --git a/server/lib/src/be/idl_arc_sqlite.rs b/server/lib/src/be/idl_arc_sqlite.rs index db1b3ac22..c3f439822 100644 --- a/server/lib/src/be/idl_arc_sqlite.rs +++ b/server/lib/src/be/idl_arc_sqlite.rs @@ -149,16 +149,16 @@ macro_rules! get_identry_raw { }}; } -macro_rules! exists_idx { - ( - $self:expr, - $attr:expr, - $itype:expr - ) => {{ - // As a cache we have no concept of this, so we just bypass to the db. - $self.db.exists_idx($attr, $itype) - }}; -} +// macro_rules! exists_idx { +// ( +// $self:expr, +// $attr:expr, +// $itype:expr +// ) => {{ +// // As a cache we have no concept of this, so we just bypass to the db. +// $self.db.exists_idx($attr, $itype) +// }}; +// } macro_rules! get_idl { ( @@ -342,7 +342,7 @@ pub trait IdlArcSqliteTransaction { fn get_identry_raw(&self, idl: &IdList) -> Result, OperationError>; - fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result; + // fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result; fn get_idl( &mut self, @@ -397,9 +397,9 @@ impl<'a> IdlArcSqliteTransaction for IdlArcSqliteReadTransaction<'a> { get_identry_raw!(self, idl) } - fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result { - exists_idx!(self, attr, itype) - } + // fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result { + // exists_idx!(self, attr, itype) + // } #[instrument(level = "trace", skip_all)] fn get_idl( @@ -492,9 +492,9 @@ impl<'a> IdlArcSqliteTransaction for IdlArcSqliteWriteTransaction<'a> { get_identry_raw!(self, idl) } - fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result { - exists_idx!(self, attr, itype) - } + // fn exists_idx(&mut self, attr: &str, itype: IndexType) -> Result { + // exists_idx!(self, attr, itype) + // } #[instrument(level = "trace", skip_all)] fn get_idl( diff --git a/server/lib/src/plugins/mod.rs b/server/lib/src/plugins/mod.rs index ad379ef32..84dea658b 100644 --- a/server/lib/src/plugins/mod.rs +++ b/server/lib/src/plugins/mod.rs @@ -163,17 +163,17 @@ trait Plugin { Err(OperationError::InvalidState) } - fn pre_repl_incremental( - _qs: &mut QueryServerWriteTransaction, - _cand: &mut [(EntryIncrementalCommitted, Arc)], - ) -> Result<(), OperationError> { - admin_error!( - "plugin {} has an unimplemented pre_repl_incremental!", - Self::id() - ); - debug_assert!(false); - Err(OperationError::InvalidState) - } + // fn pre_repl_incremental( + // _qs: &mut QueryServerWriteTransaction, + // _cand: &mut [(EntryIncrementalCommitted, Arc)], + // ) -> Result<(), OperationError> { + // admin_error!( + // "plugin {} has an unimplemented pre_repl_incremental!", + // Self::id() + // ); + // debug_assert!(false); + // Err(OperationError::InvalidState) + // } fn post_repl_incremental_conflict( _qs: &mut QueryServerWriteTransaction, diff --git a/server/lib/src/server/keys/object.rs b/server/lib/src/server/keys/object.rs index 8038349a5..8c2d9cf60 100644 --- a/server/lib/src/server/keys/object.rs +++ b/server/lib/src/server/keys/object.rs @@ -6,6 +6,9 @@ use std::collections::BTreeSet; use uuid::Uuid; pub type KeyObject = Box; + +// currently only used in testing, so no need to to exist until then +#[cfg(test)] pub type KeyObjectRef<'a> = &'a (dyn KeyObjectT + Send + Sync + 'static); pub trait KeyObjectT { diff --git a/server/lib/src/server/keys/provider.rs b/server/lib/src/server/keys/provider.rs index 503f08c6f..c73c831be 100644 --- a/server/lib/src/server/keys/provider.rs +++ b/server/lib/src/server/keys/provider.rs @@ -9,7 +9,10 @@ use std::ops::Deref; use std::sync::Arc; use super::internal::KeyProviderInternal; -use super::object::{KeyObject, KeyObjectRef}; +use super::object::KeyObject; + +#[cfg(test)] +use super::object::KeyObjectRef; #[derive(Clone)] pub enum KeyProvider { @@ -119,8 +122,10 @@ impl KeyProviders { } pub trait KeyProvidersTransaction { + #[cfg(test)] fn get_uuid(&self, key_provider_uuid: Uuid) -> Option<&KeyProvider>; + #[cfg(test)] fn get_key_object(&self, key_object_uuid: Uuid) -> Option; fn get_key_object_handle(&self, key_object_uuid: Uuid) -> Option>; @@ -131,6 +136,7 @@ pub struct KeyProvidersReadTransaction { } impl KeyProvidersTransaction for KeyProvidersReadTransaction { + #[cfg(test)] fn get_uuid(&self, key_provider_uuid: Uuid) -> Option<&KeyProvider> { self.inner .deref() @@ -139,6 +145,7 @@ impl KeyProvidersTransaction for KeyProvidersReadTransaction { .map(|k| k.as_ref()) } + #[cfg(test)] fn get_key_object(&self, key_object_uuid: Uuid) -> Option { self.inner .deref() @@ -161,6 +168,7 @@ pub struct KeyProvidersWriteTransaction<'a> { } impl<'a> KeyProvidersTransaction for KeyProvidersWriteTransaction<'a> { + #[cfg(test)] fn get_uuid(&self, key_provider_uuid: Uuid) -> Option<&KeyProvider> { self.inner .deref() @@ -169,6 +177,7 @@ impl<'a> KeyProvidersTransaction for KeyProvidersWriteTransaction<'a> { .map(|k| k.as_ref()) } + #[cfg(test)] fn get_key_object(&self, key_object_uuid: Uuid) -> Option { self.inner .deref() diff --git a/tools/orca/src/generate.rs b/tools/orca/src/generate.rs index 7a14917d1..3b18f1d21 100644 --- a/tools/orca/src/generate.rs +++ b/tools/orca/src/generate.rs @@ -12,11 +12,11 @@ use std::collections::BTreeSet; const PEOPLE_PREFIX: &str = "person"; -#[derive(Debug)] -pub struct PartialGroup { - pub name: String, - pub members: BTreeSet, -} +// #[derive(Debug)] +// pub struct PartialGroup { +// pub name: String, +// pub members: BTreeSet, +// } fn random_name(prefix: &str, rng: &mut ChaCha8Rng) -> String { let suffix = Alphanumeric.sample_string(rng, 8).to_lowercase();