-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Fix manual task trigger failing for k8s. #28394
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
Fix manual task trigger failing for k8s. #28394
Conversation
bf09d07 to
cacec62
Compare
|
@snjypl To test if this works, I've patched our installation of airflow with the changes in this pr, and unfortunately there are still problems when executing a task manually: |
cacec62 to
d2da7c4
Compare
|
@arjunanan6 can you please try the the latest code? i removed the job_id check. also, while viewing the log you might face this issue depending on your logging configuration: #28817 |
|
@snjypl I will test it later this evening. Logging-wise, we should be okay as we use remote logging (WASB). |
ddf4336 to
44640d0
Compare
|
@snjypl Just got time now... I can't run your patch though, it fails to build: |
bbd5c69 to
653083a
Compare
@arjunanan6 can you please try it now? |
|
@snjypl That solved the previous issue, and the execution is attempted now. However, manual runs still fail because the service account gets rejected from creating a pod for the execution: Which is strange, because this SA is allowed to create pods, and other tasks are being executed by the same service account. I trimmed out the pod definition, but nothing looks particularly out of place there. Any idea why this fails only on a manual run attempt? |
this issue is caused by |
yes @arjunanan6 i think, it would be better if you could open a new issue with details about your environment, deployment method etc. it will help in debugging and resolving the issue. we can link that issue to the other PR #29012 and address it there. |
653083a to
92f3ce0
Compare
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thikn we need a ot more context in commit - what hapens here.
92f3ce0 to
4de0b0a
Compare
i have added a more descriptive commit message. |
4de0b0a to
aa0fedf
Compare
Manual task trigger from UI fails for k8s executor. the executor.job_id is currently set to "manual". the task instance queued_by_job_id field is expected to be None|Integer. this causes the filter query in clear_not_launched_queued_tasks method in kubernetes_executor to fail with psycopg2.errors.InvalidTextRepresentation invalid input syntax for integer: "manual" error. setting the job_id to None fixes the issue.
aa0fedf to
dfccccd
Compare
Manual task trigger from UI fails for k8s executor. the executor.job_id is currently set to "manual". the task instance queued_by_job_id field is expected to be None|Integer. this causes the filter query in clear_not_launched_queued_tasks method in kubernetes_executor to fail with psycopg2.errors.InvalidTextRepresentation invalid input syntax for integer: "manual" error. setting the job_id to None fixes the issue. (cherry picked from commit 9510043)
Manual task trigger from UI fails for k8s executor. the executor.job_id is currently set to "manual". the task instance queued_by_job_id field is expected to be None|Integer. this causes the filter query in clear_not_launched_queued_tasks method in kubernetes_executor to fail with psycopg2.errors.InvalidTextRepresentation invalid input syntax for integer: "manual" error. setting the job_id to None fixes the issue. (cherry picked from commit 9510043)
Fix #28391 manual task trigger from UI fails for k8s executor
Manual task trigger from UI fails for k8s executor. the executor.job_id
is currently set to "manual". the task instance queued_by_job_id field
is expected to be None|Integer. this causes the filter query in
clear_not_launched_queued_tasks method in kubernetes_executor to fail
with psycopg2.errors.InvalidTextRepresentation invalid input syntax for integer: "manual" error.
setting the job_id to None fixes the issue.
Fixes: #28391
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.