You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ro...@apache.org on 2024/10/15 09:25:10 UTC
(airflow) branch v2-10-test updated: update k8s tests urllib3 retry config status_forcelist and allowed_methods (#42871) (#43026)
This is an automated email from the ASF dual-hosted git repository.
rom pushed a commit to branch v2-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v2-10-test by this push:
new 744d2b0f52 update k8s tests urllib3 retry config status_forcelist and allowed_methods (#42871) (#43026)
744d2b0f52 is described below
commit 744d2b0f52ed1d42a208ac48700f8d412bc7be9a
Author: GPK <go...@gmail.com>
AuthorDate: Tue Oct 15 10:25:02 2024 +0100
update k8s tests urllib3 retry config status_forcelist and allowed_methods (#42871) (#43026)
---
kubernetes_tests/test_base.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kubernetes_tests/test_base.py b/kubernetes_tests/test_base.py
index 17d1c99543..df5f520c62 100644
--- a/kubernetes_tests/test_base.py
+++ b/kubernetes_tests/test_base.py
@@ -123,7 +123,12 @@ class BaseK8STest:
def _get_session_with_retries(self):
session = requests.Session()
session.auth = ("admin", "admin")
- retries = Retry(total=3, backoff_factor=1)
+ retries = Retry(
+ total=3,
+ backoff_factor=1,
+ status_forcelist=[404],
+ allowed_methods=Retry.DEFAULT_ALLOWED_METHODS | frozenset(["PATCH", "POST"]),
+ )
session.mount("http://", HTTPAdapter(max_retries=retries))
session.mount("https://", HTTPAdapter(max_retries=retries))
return session