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.

Batch.Client.describe_job_definitions parameter jobDefinitions doesn't work as described

See original GitHub issue

Describe the bug The documentation for https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch.html#Batch.Client.describe_job_definitions says:

jobDefinitions (list) – A list of up to 100 job definition names or full Amazon Resource Name (ARN) entries.

However it seems to only accept ARNs and providing job definition names doesn’t work.

Steps to reproduce

job_definitions = batch.describe_job_definitions(jobDefinitions=["arn:aws:batch:us-east-1:589864003899:job-definition/kurt_dev_JANITOR:1199"], status="ACTIVE")

and

job_definitions = batch.describe_job_definitions(jobDefinitionName="kurt_dev_JANITOR", status="ACTIVE")

work but

job_definitions = batch.describe_job_definitions(jobDefinitions=["kurt_dev_JANITOR"], status="ACTIVE")

doesn’t.

Expected behavior As I am providing an exactly matching name for the job defintion, I would expect providing it in a list as the jobDefinitions parameter to work as well as it does when provided as the jobDefinitionName parameter since jobDefinitions says “A list of up to 100 job definition names or…”

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
kurtwheelercommented, Jun 29, 2021

Wow! Thanks for doing all that! I love to see that the documentation will be clarified.

The only way currently to get all revisions for multiple job definitions is to request each one individually.

I don’t really think this is too big of an issue. It just is an extra request to make in an extra level of a loop but one I’ve already fixed in https://github.com/AlexsLemonade/refinebio/blob/fab031300fcadd670e27cd61ef2829f150082f04/infrastructure/deregister_batch_job_definitions.py

My use case is during my deployment. I use terraform to manage most of my AWS infrastructure, but I manage the job definitions using boto3. Because any given deploy could add, remove, or change any number of job definitions I deregister all of them, regenerate JSON specifications for them based on templates, and then register them.

0reactions
github-actions[bot]commented, Jul 1, 2021

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

Read more comments on GitHub >

github_iconTop Results From Across the Web

DescribeJobDefinitions - AWS Batch
Describes a list of job definitions. You can specify a status (such as ACTIVE ) to only return job definitions that match that...
Read more >
Batch — Boto3 Docs 1.26.33 documentation - AWS
A low-level client representing AWS Batch. Using Batch, you can run batch computing workloads on the Amazon Web Services Cloud. Batch computing is...
Read more >
batch - Go Packages
Package batch provides the API client, operations, and parameter types for AWS Batch. ... Describes a list of job definitions.
Read more >
AWS batch job submit error-Batch.ClientException
It is all about writting the correct the JobDefinition parameter. Check if the parameter value is the same as the those defined in...
Read more >
Using AWS Batch at Fred Hutch
If you've found an existing Docker image that meets your needs, you don't need ... You can see all job definitions with aws...
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