Azure / batch-shipyard

Simplify HPC and Batch workloads on Azure
MIT License
277 stars 121 forks source link

Shipyard 3.9.0: TypeError: object of type 'CloudTaskPaged' has no len() #329

Closed sebastko closed 4 years ago

sebastko commented 5 years ago

Problem Description

Adding job schedule with task_factory inside it, which had been successful with Shipyard 3.8.2, started failing after upgrading to 3.9.0.

Batch Shipyard Version

3.9.0

Steps to Reproduce

shipyard jobs add Please contact me directly if you need more details about the job definition.

Expected Results

Job schedule added successfully.

Actual Results

2019-11-27T21:20:12.1588023Z 2019-11-27 21:20:12.145 DEBUG - constructing 21 task specifications for submission to job ********
2019-11-27T21:20:12.1993665Z Traceback (most recent call last):
2019-11-27T21:20:12.1994273Z   File "D:\a\r1\a\batch-shipyard\shipyard.py", line 3134, in <module>
2019-11-27T21:20:12.1994475Z     cli()
2019-11-27T21:20:12.1994702Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 764, in __call__
2019-11-27T21:20:12.1994930Z     return self.main(*args, **kwargs)
2019-11-27T21:20:12.1995154Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 717, in main
2019-11-27T21:20:12.1995347Z     rv = self.invoke(ctx)
2019-11-27T21:20:12.1995553Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 1137, in invoke
2019-11-27T21:20:12.1995770Z     return _process_result(sub_ctx.command.invoke(sub_ctx))
2019-11-27T21:20:12.1995978Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 1137, in invoke
2019-11-27T21:20:12.1996233Z     return _process_result(sub_ctx.command.invoke(sub_ctx))
2019-11-27T21:20:12.1997393Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 956, in invoke
2019-11-27T21:20:12.1997622Z     return ctx.invoke(self.callback, **ctx.params)
2019-11-27T21:20:12.1997821Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 555, in invoke
2019-11-27T21:20:12.1998069Z     return callback(*args, **kwargs)
2019-11-27T21:20:12.1998291Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\decorators.py", line 64, in new_func
2019-11-27T21:20:12.1998514Z     return ctx.invoke(f, obj, *args, **kwargs)
2019-11-27T21:20:12.1998710Z   File "C:\hostedtoolcache\windows\Python\3.5.4\x64\lib\site-packages\click\core.py", line 555, in invoke
2019-11-27T21:20:12.1998929Z     return callback(*args, **kwargs)
2019-11-27T21:20:12.1999268Z   File "D:\a\r1\a\batch-shipyard\shipyard.py", line 1969, in jobs_add
2019-11-27T21:20:12.1999458Z     ctx.table_client, ctx.keyvault_client, ctx.config, recreate, tail)
2019-11-27T21:20:12.1999695Z   File "D:\a\r1\a\batch-shipyard\convoy\fleet.py", line 4036, in action_jobs_add
2019-11-27T21:20:12.1999903Z     _AUTOSCRATCH_FILE, recreate, tail)
2019-11-27T21:20:12.2000097Z   File "D:\a\r1\a\batch-shipyard\convoy\batch.py", line 5621, in add_jobs
2019-11-27T21:20:12.2000278Z     container_image_refs, _task
2019-11-27T21:20:12.2000476Z   File "D:\a\r1\a\batch-shipyard\convoy\batch.py", line 4536, in _construct_task
2019-11-27T21:20:12.2000682Z     federation_id=federation_id)
2019-11-27T21:20:12.2000891Z   File "D:\a\r1\a\batch-shipyard\convoy\batch.py", line 4202, in _generate_next_generic_task_id
2019-11-27T21:20:12.2001085Z     if (util.is_not_empty(tasklist) and
2019-11-27T21:20:12.2001290Z   File "D:\a\r1\a\batch-shipyard\convoy\util.py", line 168, in is_not_empty
2019-11-27T21:20:12.2001509Z     return obj is not None and len(obj) > 0
2019-11-27T21:20:12.2001725Z TypeError: object of type 'CloudTaskPaged' has no len()