From 7992cfd41b7729ec2cd54a80cd3ba0670918d3bd Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 12 Oct 2025 18:26:45 -0400 Subject: [PATCH 01/11] Version fix --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a45f10d..30e188f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,7 +853,7 @@ dependencies = [ [[package]] name = "icarus" -version = "0.3.0" +version = "0.2.3" dependencies = [ "axum", "axum-extra", diff --git a/Cargo.toml b/Cargo.toml index b642710..35430c0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icarus" -version = "0.3.0" +version = "0.2.3" edition = "2024" rust-version = "1.90" -- 2.47.3 From a2fa097cfc4f575eafa2f40d491422ae57945ac8 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 12 Oct 2025 18:27:57 -0400 Subject: [PATCH 02/11] Workflow fix --- .github/workflows/workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 152abea..772f488 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -2,9 +2,9 @@ name: Rust CI on: push: - branches: [ "v0.2" ] + branches: [ "main" ] pull_request: - branches: [ "v0.2" ] + branches: [ "main" ] jobs: build: @@ -25,7 +25,7 @@ jobs: --health-retries 5 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install Rust 1.90.0 uses: actions-rs/toolchain@v1 -- 2.47.3 From a108364916aec23e5beb4b2bdc76c06d0b981bfd Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 12 Oct 2025 18:37:30 -0400 Subject: [PATCH 03/11] Test fix --- src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index a373fb0..56a2fdf 100644 --- a/src/main.rs +++ b/src/main.rs @@ -375,7 +375,7 @@ mod tests { } pub async fn get_database_name() -> Result> { - let database_url = icarus_envy::environment::get_db_url().await; + let database_url = icarus_envy::environment::get_db_url().await.value; let parsed_url = url::Url::parse(&database_url)?; if parsed_url.scheme() == "postgres" || parsed_url.scheme() == "postgresql" { @@ -425,7 +425,7 @@ mod tests { pub const TEST_USER_ID: uuid::Uuid = uuid::uuid!("cc938368-615a-4694-b2ca-6e122fa31c52"); pub async fn test_token() -> Result { - let key: String = icarus_envy::environment::get_secret_main_key().await; + let key: String = icarus_envy::environment::get_secret_main_key().await.value; let (message, issuer, audience) = token_fields(); let token_resource = icarus_models::token::TokenResource { @@ -2384,8 +2384,8 @@ mod tests { ..Default::default() }; - match song.to_data() { - Ok(song_data) => match coverart.to_data() { + match icarus_models::song::io::to_data(&song) { + Ok(song_data) => match icarus_models::coverart::io::to_data(&coverart) { Ok(coverart_data) => Ok((song_data, coverart_data)), Err(err) => Err(err), }, -- 2.47.3 From 0b6d4a4310ab6d5a4b690aee40d02df87c5fde6a Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sun, 12 Oct 2025 20:43:28 -0400 Subject: [PATCH 04/11] Test fix --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 56a2fdf..43b7d88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -335,7 +335,7 @@ mod tests { pub const LIMIT: usize = 6; pub async fn get_pool() -> Result { - let tm_db_url = icarus_envy::environment::get_db_url().await; + let tm_db_url = icarus_envy::environment::get_db_url().await.value; let tm_options = sqlx::postgres::PgConnectOptions::from_str(&tm_db_url).unwrap(); sqlx::PgPool::connect_with(tm_options).await } @@ -348,7 +348,7 @@ mod tests { } pub async fn connect_to_db(db_name: &str) -> Result { - let db_url = icarus_envy::environment::get_db_url().await; + let db_url = icarus_envy::environment::get_db_url().await.value; let options = sqlx::postgres::PgConnectOptions::from_str(&db_url)?.database(db_name); sqlx::PgPool::connect_with(options).await } -- 2.47.3 From 4678a4820c917c6dad671302349d7b0b04cae59e Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 16:23:13 -0400 Subject: [PATCH 05/11] Removing code that was meant to be removed Caused an extra file to be created when the request is called --- src/callers/song.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/callers/song.rs b/src/callers/song.rs index 20e3cb8..bc3eccb 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -907,11 +907,6 @@ pub mod endpoint { data.len() ); - // TODO: Remove this - // Save the file to disk - let mut file = std::fs::File::create(&file_name).unwrap(); - file.write_all(&data).unwrap(); - let raw_data: Vec = data.to_vec(); let queue_repo = song_queue::insert( &pool, -- 2.47.3 From b6381efcaa70b12f97e5d32fe8a3469f78ed97ff Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 16:27:22 -0400 Subject: [PATCH 06/11] Updated env sample to address workflow --- .env.sample | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.sample b/.env.sample index f53ca9a..8be2df0 100644 --- a/.env.sample +++ b/.env.sample @@ -1,8 +1,8 @@ -APP_ENV=development +APP_ENV=production BACKEND_PORT=8000 FRONTEND_URL=http://localhost:4200 RUST_LOG=debug -ALLOWED_ORIGINS=https://soaricarus.com,https://www.soaricarus.com +ALLOWED_ORIGINS=https://soaricarus.com,https://www.soaricarus.com,http://localhost:8000,http://127.0.0.1:8000 SECRET_MAIN_KEY=refero34o8rfhfjn983thf39fhc943rf923n3h ROOT_DIRECTORY=/home/icarus/mydata POSTGRES_MAIN_USER=icarus -- 2.47.3 From 2251f0e36efa96bb3a13207b32fe835e3219621a Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 16:28:14 -0400 Subject: [PATCH 07/11] Removed import --- src/callers/song.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/callers/song.rs b/src/callers/song.rs index bc3eccb..b6f6e3c 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -869,8 +869,6 @@ mod song_queue { pub mod endpoint { use axum::{Json, http::StatusCode, response::IntoResponse}; - use std::io::Write; - use crate::callers::song::song_queue; /// Endpoint to queue a song. Starts the process and places the song in a queue -- 2.47.3 From aafc44cdac21b0f3f411149b1109fec64b694731 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 16:39:47 -0400 Subject: [PATCH 08/11] env fix --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 772f488..be9b246 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -69,7 +69,7 @@ jobs: ROOT_DIRECTORY: "/tmp" DATABASE_URL: "postgres://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/${{ secrets.POSTGRES_DB }}" run: | - cat .env.sample | head -1 > .env + cat .env.sample | head -6 > .env cargo test --verbose -- - name: Run clippy -- 2.47.3 From e6974ad951030a256ecf64263ff6e5df3b898a86 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 16:44:13 -0400 Subject: [PATCH 09/11] Version change --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 30e188f..bfb6d79 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,7 +853,7 @@ dependencies = [ [[package]] name = "icarus" -version = "0.2.3" +version = "0.2.4" dependencies = [ "axum", "axum-extra", diff --git a/Cargo.toml b/Cargo.toml index 35430c0..07409ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icarus" -version = "0.2.3" +version = "0.2.4" edition = "2024" rust-version = "1.90" -- 2.47.3 From ea0ae16bb6106d093f31cd290a324e40e3ab1034 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 17:14:32 -0400 Subject: [PATCH 10/11] Version bump Going with the version I done earlier. I won't have the versioning match the api version in the endpoints --- Cargo.lock | 2 +- Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bfb6d79..a45f10d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,7 +853,7 @@ dependencies = [ [[package]] name = "icarus" -version = "0.2.4" +version = "0.3.0" dependencies = [ "axum", "axum-extra", diff --git a/Cargo.toml b/Cargo.toml index 07409ae..b642710 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "icarus" -version = "0.2.4" +version = "0.3.0" edition = "2024" rust-version = "1.90" -- 2.47.3 From b9708b7075c8cd56823019406b1684fc663b9052 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Mon, 13 Oct 2025 23:28:26 -0400 Subject: [PATCH 11/11] Fixing versions for app dependencies --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 58298aa..a76440a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ Web API for the Icarus project. +### Requires +`icarus_auth` +v0.6.0 +`songparser` +v0.4.1 + ## Getting Started Quickest way to get started is with docker. Make sure `icarus_auth` and `songparser` repositories are located in the root of the parent directory. Check the respective repositories to ensure they -- 2.47.3