From 685e865b428b98141e6b082a41bfd909fad59095 Mon Sep 17 00:00:00 2001 From: J H <2364004+Blu-J@users.noreply.github.com> Date: Tue, 19 Dec 2023 10:16:18 -0700 Subject: [PATCH 1/3] fix: Docker stopping will include a timeout (#2540) * fix sdk build script * fix: Docker stopping will include a timeoute So the timeout that was included in the original is not working therefore we move to a doublinig with a timeout * fix: Adding in the missing suggestions that Aiden has poinited out * Update install-sdk.sh * Update install-sdk.sh --------- Co-authored-by: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Co-authored-by: Aiden McClelland --- core/startos/src/manager/manager_seed.rs | 10 +++++++++- core/startos/src/util/docker.rs | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/core/startos/src/manager/manager_seed.rs b/core/startos/src/manager/manager_seed.rs index f90e7739f..35ebee409 100644 --- a/core/startos/src/manager/manager_seed.rs +++ b/core/startos/src/manager/manager_seed.rs @@ -29,7 +29,15 @@ impl ManagerSeed { ) .await { - Err(e) if e.kind == ErrorKind::NotFound => (), // Already stopped + Err(e) if e.kind == ErrorKind::NotFound => { + tracing::info!( + "Command for package {command_id} should already be stopped", + command_id = &self.manifest.id + ); + } // Already stopped + Err(e) if e.kind == ErrorKind::Timeout => { + tracing::warn!("Command for package {command_id} had to be timed out, but we have dropped which means it should be killed", command_id = &self.manifest.id); + } // Already stopped In theory a => a?, } Ok(()) diff --git a/core/startos/src/util/docker.rs b/core/startos/src/util/docker.rs index fb6bc15f4..db6aa30c0 100644 --- a/core/startos/src/util/docker.rs +++ b/core/startos/src/util/docker.rs @@ -113,6 +113,7 @@ pub async fn stop_container( signal: Option, ) -> Result<(), Error> { let mut cmd = Command::new(CONTAINER_TOOL); + let mut cmd = cmd.timeout(timeout); cmd.arg("stop"); if let Some(dur) = timeout { cmd.arg("-t").arg(dur.as_secs().to_string()); From cb63025078859951e002bdacea281a068b56317e Mon Sep 17 00:00:00 2001 From: J H <2364004+Blu-J@users.noreply.github.com> Date: Wed, 20 Dec 2023 14:58:24 -0700 Subject: [PATCH 2/3] chore: Initial commit for the bump to 0.3.5.2 (#2541) * chore: Initial commit for the bump * wip(fix): build * chore: Update the os welcome page to include the previous release of the 0.3.5.1 --- core/Cargo.lock | 2 +- core/startos/Cargo.toml | 2 +- core/startos/src/version/mod.rs | 7 +++- core/startos/src/version/v0_3_5_2.rs | 32 +++++++++++++++++++ web/package.json | 2 +- web/patchdb-ui-seed.json | 2 +- .../modals/os-welcome/os-welcome.page.html | 17 ++++++++-- .../ui/src/app/services/api/api.fixures.ts | 3 +- .../ui/src/app/services/api/mock-patch.ts | 2 +- 9 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 core/startos/src/version/v0_3_5_2.rs diff --git a/core/Cargo.lock b/core/Cargo.lock index cc7698271..6b5c1667e 100644 --- a/core/Cargo.lock +++ b/core/Cargo.lock @@ -4924,7 +4924,7 @@ dependencies = [ [[package]] name = "start-os" -version = "0.3.5-rev.1" +version = "0.3.5-rev.2" dependencies = [ "aes", "async-compression", diff --git a/core/startos/Cargo.toml b/core/startos/Cargo.toml index 65d01b1db..99a9d2119 100644 --- a/core/startos/Cargo.toml +++ b/core/startos/Cargo.toml @@ -14,7 +14,7 @@ keywords = [ name = "start-os" readme = "README.md" repository = "https://github.com/Start9Labs/start-os" -version = "0.3.5-rev.1" +version = "0.3.5-rev.2" license = "MIT" [lib] diff --git a/core/startos/src/version/mod.rs b/core/startos/src/version/mod.rs index 4c6f157a5..6d9f65b8a 100644 --- a/core/startos/src/version/mod.rs +++ b/core/startos/src/version/mod.rs @@ -15,8 +15,9 @@ mod v0_3_4_3; mod v0_3_4_4; mod v0_3_5; mod v0_3_5_1; +mod v0_3_5_2; -pub type Current = v0_3_5_1::Version; +pub type Current = v0_3_5_2::Version; #[derive(serde::Serialize, serde::Deserialize, Debug, Clone)] #[serde(untagged)] @@ -28,6 +29,7 @@ enum Version { V0_3_4_4(Wrapper), V0_3_5(Wrapper), V0_3_5_1(Wrapper), + V0_3_5_2(Wrapper), Other(emver::Version), } @@ -50,6 +52,7 @@ impl Version { Version::V0_3_4_4(Wrapper(x)) => x.semver(), Version::V0_3_5(Wrapper(x)) => x.semver(), Version::V0_3_5_1(Wrapper(x)) => x.semver(), + Version::V0_3_5_2(Wrapper(x)) => x.semver(), Version::Other(x) => x.clone(), } } @@ -176,6 +179,7 @@ pub async fn init(db: &PatchDb, secrets: &PgPool) -> Result<(), Error> { Version::V0_3_4_4(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?, Version::V0_3_5(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?, Version::V0_3_5_1(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?, + Version::V0_3_5_2(v) => v.0.migrate_to(&Current::new(), db.clone(), secrets).await?, Version::Other(_) => { return Err(Error::new( eyre!("Cannot downgrade"), @@ -215,6 +219,7 @@ mod tests { Just(Version::V0_3_4_4(Wrapper(v0_3_4_4::Version::new()))), Just(Version::V0_3_5(Wrapper(v0_3_5::Version::new()))), Just(Version::V0_3_5_1(Wrapper(v0_3_5_1::Version::new()))), + Just(Version::V0_3_5_2(Wrapper(v0_3_5_2::Version::new()))), em_version().prop_map(Version::Other), ] } diff --git a/core/startos/src/version/v0_3_5_2.rs b/core/startos/src/version/v0_3_5_2.rs new file mode 100644 index 000000000..860a0ce56 --- /dev/null +++ b/core/startos/src/version/v0_3_5_2.rs @@ -0,0 +1,32 @@ +use async_trait::async_trait; +use emver::VersionRange; +use sqlx::PgPool; + +use super::VersionT; +use super::{v0_3_4::V0_3_0_COMPAT, v0_3_5_1}; +use crate::prelude::*; + +const V0_3_5_2: emver::Version = emver::Version::new(0, 3, 5, 2); + +#[derive(Clone, Debug)] +pub struct Version; + +#[async_trait] +impl VersionT for Version { + type Previous = v0_3_5_1::Version; + fn new() -> Self { + Version + } + fn semver(&self) -> emver::Version { + V0_3_5_2 + } + fn compat(&self) -> &'static VersionRange { + &V0_3_0_COMPAT + } + async fn up(&self, _db: PatchDb, _secrets: &PgPool) -> Result<(), Error> { + Ok(()) + } + async fn down(&self, _db: PatchDb, _secrets: &PgPool) -> Result<(), Error> { + Ok(()) + } +} diff --git a/web/package.json b/web/package.json index 7784543fe..80ee91e39 100644 --- a/web/package.json +++ b/web/package.json @@ -1,6 +1,6 @@ { "name": "startos-ui", - "version": "0.3.5.1", + "version": "0.3.5.2", "author": "Start9 Labs, Inc", "homepage": "https://start9.com/", "scripts": { diff --git a/web/patchdb-ui-seed.json b/web/patchdb-ui-seed.json index 0a678d4e8..30eb8900b 100644 --- a/web/patchdb-ui-seed.json +++ b/web/patchdb-ui-seed.json @@ -1,6 +1,6 @@ { "name": null, - "ack-welcome": "0.3.5.1", + "ack-welcome": "0.3.5.2", "marketplace": { "selected-url": "https://registry.start9.com/", "known-hosts": { diff --git a/web/projects/ui/src/app/modals/os-welcome/os-welcome.page.html b/web/projects/ui/src/app/modals/os-welcome/os-welcome.page.html index 23bc7e1fd..292480e09 100644 --- a/web/projects/ui/src/app/modals/os-welcome/os-welcome.page.html +++ b/web/projects/ui/src/app/modals/os-welcome/os-welcome.page.html @@ -12,11 +12,11 @@

This Release

-

0.3.5.1

+

0.3.5.2

View the complete @@ -32,6 +32,19 @@

Previous 0.3.5.x Releases

+

0.3.5.1

+

+ View the complete + + release notes + + for more details. +

+

0.3.5

View the complete diff --git a/web/projects/ui/src/app/services/api/api.fixures.ts b/web/projects/ui/src/app/services/api/api.fixures.ts index 17460609a..76c43c755 100644 --- a/web/projects/ui/src/app/services/api/api.fixures.ts +++ b/web/projects/ui/src/app/services/api/api.fixures.ts @@ -21,9 +21,10 @@ export module Mock { 'shutting-down': false, } export const MarketplaceEos: RR.GetMarketplaceEosRes = { - version: '0.3.5.1', + version: '0.3.5.2', headline: 'Our biggest release ever.', 'release-notes': { + '0.3.5.2': 'Some **Markdown** release _notes_ for 0.3.5.2', '0.3.5.1': 'Some **Markdown** release _notes_ for 0.3.5.1', '0.3.4.4': 'Some **Markdown** release _notes_ for 0.3.4.4', '0.3.4.3': 'Some **Markdown** release _notes_ for 0.3.4.3', diff --git a/web/projects/ui/src/app/services/api/mock-patch.ts b/web/projects/ui/src/app/services/api/mock-patch.ts index 1dc7abd66..51689d49d 100644 --- a/web/projects/ui/src/app/services/api/mock-patch.ts +++ b/web/projects/ui/src/app/services/api/mock-patch.ts @@ -42,7 +42,7 @@ export const mockPatchData: DataModel = { }, 'server-info': { id: 'abcdefgh', - version: '0.3.5.1', + version: '0.3.5.2', 'last-backup': new Date(new Date().valueOf() - 604800001).toISOString(), 'lan-address': 'https://adjective-noun.local', 'tor-address': 'https://myveryownspecialtoraddress.onion', From d44de670cd02b5d8c6b0065e214123453311070f Mon Sep 17 00:00:00 2001 From: Aiden McClelland <3732071+dr-bonez@users.noreply.github.com> Date: Wed, 20 Dec 2023 15:20:01 -0700 Subject: [PATCH 3/3] Add socat to base dependencies (#2544) --- build/dpkg-deps/depends | 1 + 1 file changed, 1 insertion(+) diff --git a/build/dpkg-deps/depends b/build/dpkg-deps/depends index a712d4a52..d53721f3f 100644 --- a/build/dpkg-deps/depends +++ b/build/dpkg-deps/depends @@ -41,6 +41,7 @@ qemu-guest-agent rsync samba-common-bin smartmontools +socat sqlite3 squashfs-tools sudo