Uh oh!
There was an error while loading. Please reload this page.
Fix manual task trigger failing for k8s. - #28394
Conversation
bf09d07 to
cacec62Compare@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
d2da7c4Comparesnjypl
commented
Jan 9, 2023
@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 |
arjunanan6
commented
Jan 10, 2023
@snjypl I will test it later this evening. Logging-wise, we should be okay as we use remote logging (WASB). |
ddf4336 to
44640d0Comparearjunanan6
commented
Jan 14, 2023
@snjypl Just got time now... I can't run your patch though, it fails to build: |
bbd5c69 to
653083aComparesnjypl
commented
Jan 17, 2023
@arjunanan6 can you please try it now? |
arjunanan6
commented
Jan 18, 2023
@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? |
snjypl
commented
Jan 18, 2023
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. |
arjunanan6
commented
Jan 20, 2023
653083a to
92f3ce0Compare
potiuk
left a comment
There was a problem hiding this comment.
I thikn we need a ot more context in commit - what hapens here.
92f3ce0 to
4de0b0aComparesnjypl
commented
Jan 23, 2023
i have added a more descriptive commit message. |
4de0b0a to
aa0fedfCompareManual 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
dfccccdCompareManual 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#28391manual 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.