mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
integration/refactors
wip: Refactoring the service -> Made new skeleton -> Added service manager -> Manager Refactored -> Cleanup -> Add gid struct -> remove synchronizer -> Added backup into manager -> Fix the configure signal not send -> Fixes around backup and sync wip: Moved over the config into the service manager js effect for subscribing to config js effect for subscribing to config fix errors chore: Fix some things in the manager for clippy add interfaces from manifest automatically make OsApi manager-based wip: Starting down the bind for the effects todo: complete a ip todo chore: Fix the result type on something todo: Address returning chore: JS with callbacks chore: Add in the chown and permissions chore: Add in the binds and unbinds in feat: Add in the ability to get configs makefile changes add start/stop/restart to effects config hooks fix: add a default always to the get status chore: Only do updates when the thing is installed. use nistp256 to satisfy firefox use ed25519 if available chore: Make the thing buildable for testing chore: Add in the debugging fix ip signing chore: Remove the bluj tracing fix SQL error chore: Fix the build update prettytable to fix segfault Chore: Make these fn's instead of allways ran. chore: Fix the testing fix: The stopping/ restarting service fix: Fix the restarting. remove current-dependents, derive instead remove pointers from current-dependencies remove pointers and system pointers from FE v0.3.4 remove health checks from manifest remove "restarting" bool on "starting" status remove restarting attr update makefile fix add efi support fix efi add redirect if connecting to https over http clean up lan port forwarding add `make update` and `make update-overlay` fix migration more protections fix: Fix a lint chore: remove the limit on the long-running fix: Starting sometimes. fix: Make it so the stop of the main works fix: Bind local and tor with package. wip: envs closes #2152, closes #2155, closes #2157 fix TS error import config types from sdk update package.json
This commit is contained in:
@@ -12,6 +12,7 @@ use sqlx::Acquire;
|
||||
use crate::{
|
||||
config::hook::ConfigHook,
|
||||
manager::{start_stop::StartStop, Manager},
|
||||
net::keys::Key,
|
||||
};
|
||||
|
||||
use super::try_get_running_ip;
|
||||
|
||||
@@ -20,6 +20,7 @@ use crate::account::AccountInfo;
|
||||
use crate::hostname::Hostname;
|
||||
use crate::net::dhcp::ips;
|
||||
use crate::net::keys::{Key, KeyInfo};
|
||||
use crate::s9pk::manifest::PackageId;
|
||||
use crate::{Error, ErrorKind, ResultExt};
|
||||
|
||||
static CERTIFICATE_VERSION: i32 = 2; // X509 version 3 is actually encoded as '2' in the cert because fuck you.
|
||||
|
||||
@@ -253,11 +253,13 @@ mod tests {
|
||||
&self,
|
||||
id: PackageId,
|
||||
path: &str,
|
||||
callback: Callback,
|
||||
) -> Result<serde_json::Value, Report> {
|
||||
println!("Adding callback");
|
||||
self.config_callbacks.send_modify(|x| x.push(callback));
|
||||
Ok(Value::Null)
|
||||
callback: Option<Callback>,
|
||||
) -> Result<Vec<serde_json::Value>, Report> {
|
||||
if let Some(callback) = callback {
|
||||
println!("Adding callback");
|
||||
self.config_callbacks.send_modify(|x| x.push(callback));
|
||||
}
|
||||
Ok(vec![Value::Null])
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
async fn bind_local(
|
||||
@@ -265,7 +267,7 @@ mod tests {
|
||||
internal_port: u16,
|
||||
address_schema: AddressSchemaLocal,
|
||||
) -> Result<Address, Report> {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
async fn bind_onion(
|
||||
@@ -273,7 +275,27 @@ mod tests {
|
||||
internal_port: u16,
|
||||
address_schema: AddressSchemaOnion,
|
||||
) -> Result<Address, Report> {
|
||||
todo!()
|
||||
unimplemented!()
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
async fn unbind_local(&self, id: InterfaceId, external: u16) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
#[allow(unused_variables)]
|
||||
async fn unbind_onion(&self, id: InterfaceId, external: u16) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
fn set_started(&self) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
async fn restart(&self) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
async fn start(&self) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
async fn stop(&self) -> Result<(), Report> {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
#[tokio::test]
|
||||
|
||||
@@ -35,7 +35,7 @@ impl Version {
|
||||
#[cfg(test)]
|
||||
fn as_sem_ver(&self) -> emver::Version {
|
||||
match self {
|
||||
Version::LT0_3_4_3(LTWrapper(_, x)) => x.semver(),
|
||||
Version::LT0_3_4_3(LTWrapper(_, x)) => x.clone(),
|
||||
Version::V0_3_4_3(Wrapper(x)) => x.semver(),
|
||||
Version::V0_4_0(Wrapper(x)) => x.semver(),
|
||||
Version::Other(x) => x.clone(),
|
||||
@@ -187,7 +187,7 @@ where
|
||||
let v = crate::util::Version::deserialize(deserializer)?;
|
||||
let version = T::new();
|
||||
if *v == version.semver() {
|
||||
Ok(Wrapper(version))
|
||||
Ok(Self(version))
|
||||
} else {
|
||||
Err(serde::de::Error::custom("Mismatched Version"))
|
||||
}
|
||||
@@ -247,9 +247,22 @@ mod tests {
|
||||
|
||||
fn versions() -> impl Strategy<Value = Version> {
|
||||
prop_oneof![
|
||||
Just(Version::V0_3_4_3(Wrapper(v0_3_4_3::Version::new()))),
|
||||
em_version().prop_map(Version::Other),
|
||||
]
|
||||
<<<<<<< HEAD
|
||||
Just(Version::V0_3_4_3(Wrapper(v0_3_4_3::Version::new()))),
|
||||
=======
|
||||
em_version().prop_map(|v| if v < v0_3_4_1::Version::new().semver() {
|
||||
Version::LT0_3_4_1(LTWrapper(v0_3_4_1::Version::new(), v))
|
||||
} else {
|
||||
Version::LT0_3_4_1(LTWrapper(
|
||||
v0_3_4_1::Version::new(),
|
||||
emver::Version::new(0, 3, 0, 0),
|
||||
))
|
||||
}),
|
||||
Just(Version::V0_3_4_1(Wrapper(v0_3_4_1::Version::new()))),
|
||||
Just(Version::V0_3_4_2(Wrapper(v0_3_4_2::Version::new()))),
|
||||
>>>>>>> e83250f1 (integration/refactors)
|
||||
em_version().prop_map(Version::Other),
|
||||
]
|
||||
}
|
||||
|
||||
proptest! {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": null,
|
||||
"ack-welcome": "0.3.4",
|
||||
"ack-welcome": "0.4.0",
|
||||
"marketplace": {
|
||||
"selected-url": "https://registry.start9.com/",
|
||||
"known-hosts": {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::sync::Arc;
|
||||
|
||||
use color_eyre::eyre::eyre;
|
||||
use color_eyre::Report;
|
||||
use models::InterfaceId;
|
||||
use models::PackageId;
|
||||
|
||||
@@ -299,7 +299,6 @@ const effects = {
|
||||
runCommand,
|
||||
runDaemon,
|
||||
runRsync,
|
||||
chmod,
|
||||
signalGroup,
|
||||
sleep,
|
||||
start,
|
||||
|
||||
@@ -293,7 +293,6 @@ impl JsExecutionEnvironment {
|
||||
fns::chmod::decl(),
|
||||
fns::bind_local::decl(),
|
||||
fns::bind_onion::decl(),
|
||||
fns::chown::decl(),
|
||||
fns::fetch::decl(),
|
||||
fns::read_file::decl(),
|
||||
fns::metadata::decl(),
|
||||
|
||||
Reference in New Issue
Block a user