From c72845b25a1ffc9e07ae294850df72aa89c74a6e Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Thu, 19 Dec 2019 09:01:32 +0100 Subject: [PATCH 1/2] WIP: support non-flatpak repositories --- src/api.rs | 2 +- src/jobs.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/api.rs b/src/api.rs index c5360df..97df14c 100644 --- a/src/api.rs +++ b/src/api.rs @@ -293,7 +293,7 @@ fn validate_ref (ref_name: &String, req: &HttpRequest) -> Result<(),ApiError> } req.has_token_prefix(ref_parts[1]) }, - _ => Err(ApiError::BadRequest(format!("Invalid ref_name {}", ref_name))), + _ => Ok(()), // Err(ApiError::BadRequest(format!("Invalid ref_name {}", ref_name))), } } diff --git a/src/jobs.rs b/src/jobs.rs index d4fbe82..f34c9a6 100644 --- a/src/jobs.rs +++ b/src/jobs.rs @@ -565,6 +565,10 @@ impl PublishJobInstance { .arg(&src_repo_arg) .arg(&repoconfig.path); + for build_ref in build_refs.iter() { + cmd.arg(&build_ref.ref_name); + } + job_log_and_info(self.job_id, conn, &format!("Importing build to repo {}", repoconfig.name)); do_command(cmd)?; From 031339c73040d4ac52004c973ac948b44aca4654 Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Tue, 21 Jul 2020 19:44:37 +0100 Subject: [PATCH 2/2] client: retry on connection errors when uploading files --- flat-manager-client | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flat-manager-client b/flat-manager-client index 6aa8291..2a14ed6 100755 --- a/flat-manager-client +++ b/flat-manager-client @@ -199,6 +199,10 @@ async def missing_objects(session, build_url, token, wanted): missing.extend(data["missing"]) return missing +@retry( + wait=wait_fixed(10), + retry=retry_if_exception_type(aiohttp.ClientConnectionError) +) async def upload_files(session, build_url, token, files): if len(files) == 0: return