Merge pull request #3162 from wenottingham/cady-heron-was-right

Remove limit on `limit` field.

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-02-06 01:22:34 +00:00
committed by GitHub
3 changed files with 26 additions and 7 deletions

View File

@@ -3618,11 +3618,6 @@ class JobRelaunch(RetrieveAPIView):
'Cannot relaunch because previous job had 0 {status_value} hosts.'
).format(status_value=retry_hosts)}, status=status.HTTP_400_BAD_REQUEST)
copy_kwargs['limit'] = ','.join(retry_host_list)
limit_length = len(copy_kwargs['limit'])
if limit_length > 1024:
return Response({'limit': _(
'Cannot relaunch because the limit length {limit_length} exceeds the max of {limit_max}.'
).format(limit_length=limit_length, limit_max=1024)}, status=status.HTTP_400_BAD_REQUEST)
new_job = obj.copy_unified_job(**copy_kwargs)
result = new_job.signal_start(**serializer.validated_data['credential_passwords'])