question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

describe_jobs method on Batch client improperly parses job IDs

See original GitHub issue

The describe_jobs method on the Batch client is supposed to take [a] space-separated list of up to 100 job IDs (source).

However, a botocore.errorfactory.ClientException is erroneously thrown due to the presence of the space delimiting the job IDs. It appears that the client-side validation which enforces that job IDs follow the pattern [a-zA-Z_0-9-]{1,128} is executed before the space separated list of job IDs is split into individual IDs. Rather, it appears that validation is run on the entire string of space-separated IDs.

How to reproduce

response = client.describe_jobs(
    jobs=[
        'a-single-job-id'
    ]
)
# works as expected
response = client.describe_jobs(
    jobs=[
        'one-job-id and-another-separated-by-a-space'
    ]
)
# botocore.errorfactory.ClientException: An error occurred (ClientException) when calling the DescribeJobs operation: Provided name bfed896e-612d-452b-820e-15eaa14d4353,fbf155d0-1bd4-4a01-8593-1bf9ee665314 is not supported pattern[a-zA-Z_0-9-]{1,128}

Python interpreter version: Python 3.6.3 Boto3 version: 1.9.125

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jameslscommented, Apr 8, 2019

Just following up here, I cut a ticket internally to our doc team to get that updated. Thanks for reporting!

0reactions
HLeeHartcommented, Apr 25, 2019

The update has been published.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DescribeJobs - AWS Batch
Describes a list of AWS Batch jobs. ... jobs. A list of up to 100 job IDs. Type: Array of strings. Required: Yes....
Read more >
Batch — Boto3 Docs 1.26.33 documentation - AWS
Check if an operation can be paginated. Parameters: operation_name (string) -- The operation name. This is the same name as the method name...
Read more >
airflow.providers.amazon.aws.hooks.batch_client
Get job description (using status_retries). Parameters. job_id (str) – a Batch job ID. Returns. an API response for describe jobs. Raises.
Read more >
computer science | Noise | Page 4
In the past, many AWS customers have built their own batch processing systems ... register-job-definition , submit-job , list-jobs , and describe-jobs ....
Read more >
SetLoadBalancerSecurityGroups | Tencent Cloud
N, No, Array of String, Array of security group IDs. ... FormatError, Wrong parameter format. InvalidParameter.LBIdNotFound, Wrong CLB instance ID.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found