From 8709aebf47bc97c11ecfebddec42b1f5eb348302 Mon Sep 17 00:00:00 2001 From: "patched.codes[bot]" <298395+patched.codes[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 00:14:12 +0000 Subject: [PATCH 1/2] Patched /tmp/tmpazy0w79_/patchwork/common/client/patched.py --- patchwork/common/client/patched.py | 1 + 1 file changed, 1 insertion(+) diff --git a/patchwork/common/client/patched.py b/patchwork/common/client/patched.py index ddd5d81e2..8c6d59aed 100644 --- a/patchwork/common/client/patched.py +++ b/patchwork/common/client/patched.py @@ -158,6 +158,7 @@ async def _public_telemetry(self, patchflow: str, inputs: dict[str, Any]): is_container=is_container(), ), ), + timeout=10, ) def send_public_telemetry(self, patchflow: str, inputs: dict): From fa23fb0c7a6442b83ecc0b1bde8778952d4d506f Mon Sep 17 00:00:00 2001 From: "patched.codes[bot]" <298395+patched.codes[bot]@users.noreply.github.com> Date: Thu, 22 Aug 2024 00:14:12 +0000 Subject: [PATCH 2/2] Patched /tmp/tmpazy0w79_/patchwork/steps/ExtractDiff/ExtractDiff.py --- patchwork/steps/ExtractDiff/ExtractDiff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patchwork/steps/ExtractDiff/ExtractDiff.py b/patchwork/steps/ExtractDiff/ExtractDiff.py index 71c72a4cc..9a8a7c5d9 100644 --- a/patchwork/steps/ExtractDiff/ExtractDiff.py +++ b/patchwork/steps/ExtractDiff/ExtractDiff.py @@ -184,7 +184,7 @@ def run(self) -> dict: name = namespace + ":" + name vuln_version = update_info["vuln_version"] fixed_version = update_info["fixed_version"] - info = requests.get(self.libraries_base_url + platform_type + "/" + name + "?api_key=" + self.libraries_api_key) + info = requests.get(self.libraries_base_url + platform_type + "/" + name + "?api_key=" + self.libraries_api_key, timeout=10) if info.status_code != 200: logger.info(f"Unable to get repo url for library {name}") return {} @@ -204,7 +204,7 @@ def run(self) -> dict: temp_file_path = None for vuln_version, fixed_version in generate_version_combinations(vuln_version, fixed_version): - diff_file = requests.get(compare_url + vuln_version + "..." + fixed_version, headers=headers) + diff_file = requests.get(compare_url + vuln_version + "..." + fixed_version, headers=headers, timeout=10) if diff_file.text.startswith("diff"): with defered_temp_file("w") as fp: @@ -223,4 +223,4 @@ def run(self) -> dict: for diff_section in diff_sections: extracted_data.append({"diffSection": diff_section}) - return dict(prompt_values=extracted_data, library_name=name, platform_type=platform_type) + return dict(prompt_values=extracted_data, library_name=name, platform_type=platform_type) \ No newline at end of file