-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug Fix for apache-airflow-providers-jenkins
JenkinsJobTriggerOperator
#22802
Bug Fix for apache-airflow-providers-jenkins
JenkinsJobTriggerOperator
#22802
Conversation
…it should not fail the task, instead it should continue polling until reaches the max allowed polling tries
apache-airflow-providers-jenkins
apache-airflow-providers-jenkins
apache-airflow-providers-jenkins
JenkinsJobTriggerOperator
try except accounts for only the risky part of the code
The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease. |
This is to eliminate a bug in jenkins job trigger opertor. During polling for the newly created build, it is possible to get a failure and it is causing the task to fail and if task have retries then it will result in duplicate builds which could lead to problems.
here is the exception I'm receiving in the task logs:
at the line 589 of
jenkins_request
in Jenkins library it returns aJobNotFoundException
exception which leads to failure ofjenkins_request_with_headers
method. Because poll_job_in_queue doesn't account for exception handling it will fail and ultimately sets the whole task for retry (if configured!). This will lead to creating another build by going over the whole processes which is problematic.Instead it should complete its polling retries and if failed then raise airflow exception and ultimately set the task for retry.