def to_flyte_idl(self): """ :rtype: flyteidl.admin.tasks_pb2.TaskSpec """ return _admin_task.TaskSpec( template=self.template.to_flyte_idl() )
def test_hydrate_registration_parameters__task_nothing_set(): task = _task_pb2.TaskSpec( template=_core_task_pb2.TaskTemplate( id=_identifier_pb2.Identifier(resource_type=_identifier_pb2.TASK, name="name",), ) ) identifier, entity = hydrate_registration_parameters(task.template.id, "project", "domain", "12345", task) assert ( identifier == _identifier_pb2.Identifier( resource_type=_identifier_pb2.TASK, project="project", domain="domain", name="name", version="12345", ) == entity.template.id )