-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Batch.Client.describe_job_definitions parameter jobDefinitions doesn't work as described #2908
Comments
Hi @kurtwheeler, For some reason the job definition name must include the revision number. This is consistent whether providing an ARN or a job name. Try this, it should work:
Removing the revision from the ARN will return an empty list:
|
I feel like this should be better documented, as the response comes back with a |
I think it's further confusing because the It's a bit disappointing because my goal was actually to determine what revision numbers existed for those names, but perhaps it was an intentional API design decision to prevent 100 jobs with many revisions from ballooning into an enormous response. Thanks for looking into this and responding so quickly! |
I'll update here when I get a response from the AWS Batch team. In the meantime I don't see another solution to return all revisions for multiple job definitions in batch (pun intended). V389609372 |
Hi @kurtwheeler, I heard back from the Batch team. We're in agreement that the documentation could use clarification. The current support when using the Since this is not an issue with the Python SDK, I'm going to close this issue and open up a tracking issue for the documentation update in the If you can provide more details about your use case, I'd be happy to provide it to the Batch team for evidence for a feature like this. |
Wow! Thanks for doing all that! I love to see that the documentation will be clarified.
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. |
Closing in lieu of aws/aws-sdk#94. |
|
Describe the bug
The documentation for https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/batch.html#Batch.Client.describe_job_definitions says:
However it seems to only accept ARNs and providing job definition names doesn't work.
Steps to reproduce
and
work but
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..."
The text was updated successfully, but these errors were encountered: