Affinity is only set for shared volumes in the operation, not set for volume_mounts specification in the task directly
Example:
shared_directory = 'a:b'
task_write = operations.CustomTask('download-file', 'workflows-extract-download',
url='https://raw.githubusercontent.com/openworm/org.geppetto/master/README.md')
op = operations.SingleTaskOperation('test-custom-connected-op-', task_write,
shared_directory=shared_directory, shared_volume_size=100)
wf = op.to_workflow()
task_write = operations.CustomTask('download-file', 'workflows-extract-download', volume_mounts=["a:b"],
url='https://raw.githubusercontent.com/openworm/org.geppetto/master/README.md')
op = operations.SingleTaskOperation('test-custom-connected-op-', task_write, shared_volume_size=100, shared_directory=shared_directory)
wf = op.to_workflow()
Here we expect in both cases to have affinity and labels to match {"usesvolume": "a"} but only the first one works
Affinity is only set for shared volumes in the operation, not set for volume_mounts specification in the task directly
Example:
Here we expect in both cases to have affinity and labels to match
{"usesvolume": "a"}but only the first one works