task.exit_conditions.default is overridden to None after state transition
Problem Description
This happens for job containing dependency tasks. If jobs tasks list was issued when all tasks' state is active, there is no error (with a task's default exit option):
default exit options:
* job action: n/a
* dependency action: block
But when one of the tasks' state is running, this command gives an error like this:
File "/opt/batch-shipyard/convoy/fleet.py", line 3732, in action_jobs_tasks_list
batch_client, config, all=all, jobid=jobid)
File "/opt/batch-shipyard/convoy/batch.py", line 3710, in list_tasks
log.extend(log_task(task, jobid))
File "/opt/batch-shipyard/convoy/batch.py", line 3594, in log_task
if task.exit_conditions.default.job_action
AttributeError: 'NoneType' object has no attribute 'job_action'
This happens when I leave the field exit_conditions empty, and does not happen when I specify it. Somehow when we don't specify the values, it gets overridden by Azure Batch.
Batch Shipyard Version
test with 3.5.2 and 3.7.0
Steps to Reproduce
Submit a job containing some dependency tasks. If we don't specify exit_conditions, jobs tasks list will fail after tasks start running.
Hi @hieuhc, I believe this is an Azure Batch service regression. I'm going to transfer this to the other repository for tracking.
cc @matthchr
Yes, this is a Batch service bug -- a fix is being rolled out now but may take a few days to be available in all regions.
Note that this fix has been rolled out as part of 1.5.5.
Thanks for helping.