Skip to content

Commit

Permalink
fix(serverless): don't skip deployment when asset failed to download (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz authored Feb 28, 2023
1 parent e4075f5 commit 7671236
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-colts-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@lagon/serverless': patch
---

Don't skip deployment when asset failed to download
2 changes: 1 addition & 1 deletion crates/cli/src/utils/deployments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use anyhow::{anyhow, Result};
use colored::Colorize;
use dialoguer::{Confirm, Input};
use hyper::{Body, Method, Request};
use std::sync::Arc;
use std::{
collections::HashMap,
fs,
io::ErrorKind,
path::{Path, PathBuf},
process::Command,
};
use std::sync::Arc;
use walkdir::{DirEntry, WalkDir};

use pathdiff::diff_paths;
Expand Down
6 changes: 4 additions & 2 deletions crates/serverless/src/deployments/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{

use anyhow::{anyhow, Result};
use lagon_runtime_utils::Deployment;
use log::{error, info};
use log::{error, info, warn};
use mysql::{prelude::Queryable, PooledConn};
use s3::Bucket;
use tokio::sync::{Mutex, RwLock};
Expand Down Expand Up @@ -35,7 +35,9 @@ pub async fn download_deployment(deployment: &Deployment, bucket: &Bucket) -> Re
Ok(object) => {
deployment.write_asset(asset, object.bytes())?;
}
Err(error) => return Err(anyhow!(error)),
Err(error) => {
warn!(deployment = deployment.id, asset = asset; "Failed to download deployment asset: {}", error)
}
};
}
}
Expand Down

0 comments on commit 7671236

Please sign in to comment.