Add startup_check_interval_seconds to PodManager's await_pod_start#34231
Merged
eladkal merged 24 commits intoapache:mainfrom Nov 1, 2023
Merged
Add startup_check_interval_seconds to PodManager's await_pod_start#34231eladkal merged 24 commits intoapache:mainfrom
eladkal merged 24 commits intoapache:mainfrom
Conversation
…er-m60/airflow into startup_check_interval
Contributor
Author
|
Refers to #31008. |
Member
There was a problem hiding this comment.
You need to add an else after
airflow/airflow/providers/cncf/kubernetes/triggers/pod.py
Lines 171 to 184 in 1b122c1
and await asyncio.sleep(self.startup_check_interval)
hussein-awala
approved these changes
Oct 1, 2023
eladkal
approved these changes
Nov 1, 2023
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
60 tasks
romsharon98
pushed a commit
to romsharon98/airflow
that referenced
this pull request
Nov 10, 2023
…pache#34231) * add startup_check_interval_seconds * change default value in method * fix static checks, add missing param, fix typo * default is 1s * fix outdated docs * add test to check time.sleep is called with specific value * add more documentation * rephrase * add startup_check_interval_seconds * change default value in method * fix static checks, add missing param, fix typo * default is 1s * fix outdated docs * add test to check time.sleep is called with specific value * add more documentation * rephrase * add sleep in else clause * Update airflow/providers/cncf/kubernetes/triggers/pod.py --------- Co-authored-by: eladkal <45845474+eladkal@users.noreply.github.com> Co-authored-by: Hussein Awala <hussein@awala.fr>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parametrize the interval in which the Kubernetes pod status is polled when launching a new pod.
When using serverless Kubernetes services like Google GKE Autopilot the pod startup time is sometimes expected to be longer due to a cold start. Therefore the logs might be spammed due to the default checks every second (see below), and a lower check frequency might be desired