-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 AzureBatchOperator false negative status #25844
Conversation
02c7699
to
e7ddeb4
Compare
fae827d
to
42abaee
Compare
@pankajastro I still have issues with the exit code. I'm passing the following command line to "/bin/bash -c 'exit 1'" And even though the batch job fails on Azure, Airflow still considers the task to be exiting with code 0. |
that's weird, can you please share your airflow |
cmd_line = "/bin/bash -c 'exit 1'"
batch_operator = AzureBatchOperator(
task_id='batch_operator_with_inline_exit_1',
batch_pool_id='batch_pool_test',
batch_pool_vm_size='STANDARD_F48S_V2',
batch_job_id='batch_job_test',
batch_task_command_line=cmd_line,
batch_task_id='batch_task_test',
batch_max_retries=1,
batch_task_resource_files=resource_files, # var defined elsewhere, irrelevant in this example
batch_task_user_identity=user_identity, # var defined elsewhere
target_dedicated_nodes=1,
azure_batch_conn_id='azure_batch_default',
vm_publisher='Canonical',
vm_offer='0001-com-ubuntu-server-focal',
vm_sku='20_04-lts-gen2',
vm_node_agent_sku_id='batch.node.ubuntu 20.04',
timeout=360,
should_delete_job=False,
should_delete_pool=False
) As said the Azure Portal shows me that the batch job failed, and exited with exit code 1 |
Any idea how I can more easily test this? Which configuration did you use to test it @pankajastro? |
I've pushed changes in #27185 |
closes: #25635
^ 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.rst
or{issue_number}.significant.rst
, in newsfragments.