Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ def sync(self) -> None:
if (
(str(e.status) == "403" and "exceeded quota" in message)
or (str(e.status) == "409" and "object has been modified" in message)
or str(e.status) == "500"
) and (self.task_publish_max_retries == -1 or retries < self.task_publish_max_retries):
self.log.warning(
"[Try %s of %s] Kube ApiException for Task: (%s). Reason: %r. Message: %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,26 @@ def setup_method(self) -> None:
State.FAILED,
id="429 Too Many Requests (empty body)",
),
pytest.param(
HTTPResponse(
body='{"message": "Internal error occurred: failed calling webhook \\"mutation.azure-workload-identity.io\\": failed to call webhook: Post \\"https://azure-wi-webhook-webhook-service.kube-system.svc:443/mutate-v1-pod?timeout=10s\\""}',
status=500,
),
1,
True,
State.SUCCESS,
id="500 Internal Server Error (webhook failure)",
),
pytest.param(
HTTPResponse(
body='{"message": "Internal error occurred: failed calling webhook"}',
status=500,
),
1,
True,
State.FAILED,
id="500 Internal Server Error (webhook failure) (retry failed)",
),
],
)
@mock.patch("airflow.providers.cncf.kubernetes.executors.kubernetes_executor_utils.KubernetesJobWatcher")
Expand Down Expand Up @@ -439,6 +459,9 @@ def test_run_next_exception_requeue(
- your requested namespace doesn't exists
- 422 Unprocessable Entity will returns in scenarios like
- your request parameters are valid but unsupported e.g. limits lower than requests.
- 500 Internal Server Error will returns in scenarios like
- failed calling webhook - typically transient API server or webhook service issues
- should be retried if task_publish_max_retries > 0

"""
template_file = data_file("pods/generator_base_with_secrets.yaml").as_posix()
Expand Down