18 Commits

Author SHA1 Message Date
d5d3f29b9b chore(deps): update rust crate axum to v0.8.4 2025-05-01 00:24:37 +00:00
cf0e745b5b chore: update nats -> async nats 2025-03-26 21:29:17 +01:00
b7cc1b32c0 fix(deps): update aws-sdk-rust monorepo
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-03-06 01:39:18 +00:00
141f83e471 fix(deps): update all dependencies
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/pr Build is passing
2025-03-04 01:43:21 +00:00
a0da195238 chore(deps): update rust crate anyhow to v1.0.97
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-03-03 05:37:27 +00:00
43f541d8eb fix(deps): update all dependencies
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-02-27 01:41:34 +00:00
40df8cfb8b chore(deps): update rust crate clap to v4.5.31
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-25 05:37:20 +00:00
8cfea083c4 fix(deps): update aws-sdk-rust monorepo
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-02-25 01:38:27 +00:00
d5df86922e fix(deps): update rust crate tar to v0.4.44
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-02-22 01:35:06 +00:00
fb5888589c fix(deps): update rust crate uuid to v1.14.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-21 01:41:19 +00:00
294c1e2181 fix(deps): update rust crate serde to v1.0.218
All checks were successful
continuous-integration/drone/push Build is passing
2025-02-20 06:47:01 +01:00
273932a241 chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-20 05:38:33 +00:00
18b40d602f chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-18 01:39:22 +00:00
1d19736dfe fix(deps): update rust crate prost to v0.13.5
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-15 05:32:57 +00:00
42299ce354 fix(deps): update rust crate aws-sdk-s3 to v1.76.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-15 01:34:09 +00:00
a7181aff5e chore(deps): update all dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-12 01:41:24 +00:00
02e58b6e76 fix(deps): update rust crate aws-sdk-s3 to v1.74.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-07 01:36:06 +00:00
1793d8b29c fix(deps): update rust crate uuid to v1.13.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2025-02-06 01:38:36 +00:00
11 changed files with 658 additions and 685 deletions

1282
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -11,32 +11,32 @@ tracing-subscriber.workspace = true
clap.workspace = true
dotenv.workspace = true
axum.workspace = true
prost = "0.13.2"
tonic = { version = "0.12.2", features = ["tls", "tls-native-roots"] }
uuid = { version = "1.7.0", features = ["v7", "v4"] }
async-trait = "0.1.77"
prost = "0.13"
tonic = { version = "0.12", features = ["tls", "tls-native-roots"] }
uuid = { version = "1.7", features = ["v7", "v4"] }
async-trait = "0.1"
aws-config = { version = "1.5.5", features = ["behavior-version-latest"] }
aws-sdk-s3 = { version = "1.48.0", features = ["behavior-version-latest"] }
serde = { version = "1.0.196", features = ["derive"] }
serde_json = "1.0.113"
nats = "0.25.0"
serde_json = "1"
async-nats = "0.40.0"
walkdir = "2.4.0"
tar = "0.4.40"
tokio-stream = { version = "0.1.15", features = ["full"] }
rand = "0.9.0"
rand = "0.8.5"
sqlx = { version = "0.8.0", features = [
"postgres",
"runtime-tokio",
"uuid",
"chrono",
] }
chrono = "0.4.34"
git2 = "0.20.0"
rustls = { version = "0.23.12" }
chrono = "0.4"
git2 = "0.20"
rustls = { version = "0.23" }
[build-dependencies]
tonic-build = "0.12.0"
[dev-dependencies]
lazy_static = "1.4.0"
reqwest = "0.12.0"
lazy_static = "1.4"
reqwest = "0.12"

View File

@@ -1,6 +1,6 @@
use std::{ops::Deref, sync::Arc};
use sqlx::{PgPool, Postgres};
use sqlx::PgPool;
use crate::services::{
archive::Archive,

View File

@@ -1,5 +1,5 @@
use anyhow::Context;
use sqlx::{PgPool, Postgres};
use sqlx::PgPool;
pub async fn get_database() -> anyhow::Result<PgPool> {
tracing::trace!("initializing database");

View File

@@ -4,17 +4,20 @@ use anyhow::Context;
#[derive(Clone)]
pub struct Nats {
nats: Arc<nats::asynk::Connection>,
nats: Arc<async_nats::Client>,
}
impl Nats {
pub async fn new() -> anyhow::Result<Self> {
let nats = nats::asynk::Options::with_user_pass(
&std::env::var("NATS_USERNAME").context("NATS_USERNAME was not found")?,
&std::env::var("NATS_PASSWORD").context("NATS_PASSWORD was not found")?,
let nats = async_nats::connect_with_options(
std::env::var("NATS_URL").context("NATS_URL was not found")?,
async_nats::ConnectOptions::new()
.user_and_password(
std::env::var("NATS_USERNAME").context("NATS_USERNAME was not found")?,
std::env::var("NATS_PASSWORD").context("NATS_PASSWORD was not found")?,
)
.name(std::env!("CARGO_PKG_NAME")),
)
.with_name(std::env!("CARGO_PKG_NAME"))
.connect(std::env::var("NATS_URL").context("NATS_URL was not found")?)
.await?;
Ok(Self {
@@ -24,7 +27,7 @@ impl Nats {
}
impl std::ops::Deref for Nats {
type Target = nats::asynk::Connection;
type Target = async_nats::Client;
fn deref(&self) -> &Self::Target {
&self.nats

View File

@@ -1,8 +1,8 @@
use std::{env::temp_dir, fmt::Display, net::SocketAddr};
use std::{env::temp_dir, net::SocketAddr};
use tokio::io::AsyncWriteExt;
use tokio_stream::StreamExt;
use tonic::{service::interceptor, transport::Server};
use tonic::transport::Server;
use uuid::Uuid;
use crate::{

View File

@@ -2,7 +2,7 @@
pub struct Archive {}
use std::{
io::{Bytes, Cursor},
io::Cursor,
path::Path,
};

View File

@@ -15,7 +15,7 @@ impl DomainEvents {
tracing::trace!("publish events: {}", event);
self.nats
.publish("flux_releaser.domain_events", event)
.publish("flux_releaser.domain_events", event.to_string().into())
.await?;
Ok(())

View File

@@ -1,8 +1,7 @@
use tonic::transport::Channel;
use crate::{
app::infra::grpc::FluxReleaserGrpcClient,
grpc::gen::{flux_releaser_client::FluxReleaserClient, UploadArtifactRequest},
grpc::gen::UploadArtifactRequest,
};
use super::{archive::ArchiveFile, release_manager::models::UploadArtifactID};

View File

@@ -1,6 +1,6 @@
use serde::Serialize;
use crate::services::archive::{Archive, ArchiveFile};
use crate::services::archive::ArchiveFile;
use crate::services::artifacts_db::{AddCommitArtifact, GetLatestArtifact};
use crate::services::file_store::FileStore;

View File

@@ -1,6 +1,3 @@
use flux_releaser::services::{
archive::Archive, file_reader::FileReader, flux_local_cluster::FluxLocalClusterManager,
};
#[tokio::test]
async fn can_package_files() -> anyhow::Result<()> {