Skip to content
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

Missing 'attempts' & 'logStreamName' in response from client("batch").describe_job() #3719

Closed
yotam-tm opened this issue May 23, 2023 · 5 comments
Assignees
Labels
batch p3 This is a minor priority issue service-api This issue is caused by the service API, not the SDK implementation.

Comments

@yotam-tm
Copy link

Describe the bug

The boto3 documentation for client("batch").describe_job
specifies the the response should include:
...
'attempts': [
{
'container': {
'containerInstanceArn': 'string',
'taskArn': 'string',
'exitCode': 123,
'reason': 'string',
'logStreamName': 'string',
...

Alas, after successful AWS-batch run, with Associated log seen in CloudWatch logs Insight,
my query to client("batch").describe_job returned a response - listed below -
without 'attempts' and 'logStreamName' key entries.

response[jobs]:
{'arrayProperties': {'size': 2,
'statusSummary': {'FAILED': 0,
'PENDING': 0,
'RUNNABLE': 0,
'RUNNING': 0,
'STARTING': 0,
'SUBMITTED': 0,
'SUCCEEDED': 2}},
'attempts': [],
'container': {'command': ['python3',
'-m',
'CICD.aws_batch.batch_job.batch_job_wrapper',
'--batch-id',
'ym3585',
'--jenkins-job-name',
'tactile-processor_system_test_manual_aws_batch',
'--build-number',
'26',
'--sqs-url',
'https://sqs.eu-central-1.amazonaws.com/050744003022/tp_main_systest_ym3585',
'--',
'CICD/SystemTest/system_test_suites_runner.py',
'--build-number',
'26'],
'environment': [],
'image': '050744003022.dkr.ecr.eu-central-1.amazonaws.com/tp-batch-sys-test:commit_2f32b8a4d7',
'mountPoints': [],
'networkInterfaces': [],
'resourceRequirements': [{'type': 'VCPU', 'value': '2'},
{'type': 'MEMORY', 'value': '16000'}],
'secrets': [],
'ulimits': [],
'volumes': []},
'createdAt': 1684670204855,
'dependsOn': [],
'eksAttempts': [],
'jobArn': 'arn:aws:batch:eu-central-1:050744003022:job/3f1d723f-2d63-44c1-a820-56f2cc905a7b',
'jobDefinition': 'arn:aws:batch:eu-central-1:050744003022:job-definition/ym3585_job_def:48',
'jobId': '3f1d723f-2d63-44c1-a820-56f2cc905a7b',
'jobName': 'ym3585_26',
'jobQueue': 'arn:aws:batch:eu-central-1:050744003022:job-queue/tp_sys_tests_queue',
'parameters': {},
'platformCapabilities': ['EC2'],
'propagateTags': False,
'status': 'SUCCEEDED',
'tags': {'Name': 'ym3585_26'},
'timeout': {'attemptDurationSeconds': 3600}}

Expected Behavior

client("batch").describe_job([batch Job Id]) returns response with
'attempts' and 'logStreamName' key entries.

Current Behavior

client("batch").describe_job([batch Job Id]) returns response without
'attempts' and 'logStreamName' key entries.

Reproduction Steps

  • Run batch job with outputing job.
  • Verify the job can be seen in CloudWatch logs Insights
  • Run a query client("batch").describe_job([the batch Job Id you ran])
  • Inspect the returned dictionary.

Possible Solution

No response

Additional Information/Context

No response

SDK version used

boto3.version: '1.26.76'

Environment details (OS name and version, etc.)

GNU/Linux Ubuntu 22.04

@yotam-tm yotam-tm added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels May 23, 2023
@aBurmeseDev aBurmeseDev added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels May 23, 2023
@aBurmeseDev aBurmeseDev self-assigned this May 23, 2023
@aBurmeseDev
Copy link
Contributor

Hi @yotam-tm - thanks for reaching out.

I attempted to reproduce this on the latest boto3 version 1.26.139 but was unable to. It might be version issue as you're on the older version. Please try updating boto3 and give it a try.

If you could share the debug logs, that would also be helpful to find the root cause and I will also reach out to service team regarding the response you received as well.

Thanks again!

@aBurmeseDev aBurmeseDev added response-requested Waiting on additional information or feedback. service-api This issue is caused by the service API, not the SDK implementation. batch p3 This is a minor priority issue and removed bug This issue is a confirmed bug. investigating This issue is being investigated and/or work is in progress to resolve the issue. labels May 24, 2023
@yotam-tm
Copy link
Author

Thank you for your reply.
I have upgraded (via pip) to boto3 version: 1.26.139.
Still I got from client("batch".describe_jobs(jobs=[jobid])
with 'jobId': '3f1d723f-2d63-44c1-a820-56f2cc905a7b',
the response['jobs'][0] printed via pprint.pformat:

pasted here - since I cannot attach it

response[jobs]:
{'arrayProperties': {'size': 2,
'statusSummary': {'FAILED': 0,
'PENDING': 0,
'RUNNABLE': 0,
'RUNNING': 0,
'STARTING': 0,
'SUBMITTED': 0,
'SUCCEEDED': 2}},
'attempts': [],
'container': {'command': ['python3',
'-m',
'CICD.aws_batch.batch_job.batch_job_wrapper',
'--batch-id',
'ym3585',
'--jenkins-job-name',
'tactile-processor_system_test_manual_aws_batch',
'--build-number',
'26',
'--sqs-url',
'https://sqs.eu-central-1.amazonaws.com/050744003022/tp_main_systest_ym3585',
'--',
'CICD/SystemTest/system_test_suites_runner.py',
'--build-number',
'26'],
'environment': [],
'image': '050744003022.dkr.ecr.eu-central-1.amazonaws.com/tp-batch-sys-test:commit_2f32b8a4d7',
'mountPoints': [],
'networkInterfaces': [],
'resourceRequirements': [{'type': 'VCPU', 'value': '2'},
{'type': 'MEMORY', 'value': '16000'}],
'secrets': [],
'ulimits': [],
'volumes': []},
'createdAt': 1684670204855,
'dependsOn': [],
'eksAttempts': [],
'jobArn': 'arn:aws:batch:eu-central-1:050744003022:job/3f1d723f-2d63-44c1-a820-56f2cc905a7b',
'jobDefinition': 'arn:aws:batch:eu-central-1:050744003022:job-definition/ym3585_job_def:48',
'jobId': '3f1d723f-2d63-44c1-a820-56f2cc905a7b',
'jobName': 'ym3585_26',
'jobQueue': 'arn:aws:batch:eu-central-1:050744003022:job-queue/tp_sys_tests_queue',
'parameters': {},
'platformCapabilities': ['EC2'],
'propagateTags': False,
'status': 'SUCCEEDED',
'tags': {'Name': 'ym3585_26'},
'timeout': {'attemptDurationSeconds': 3600}}

@github-actions github-actions bot removed the response-requested Waiting on additional information or feedback. label May 25, 2023
@aBurmeseDev
Copy link
Contributor

checking in if this's still an issue. I'm getting both attempts and logStreamName in my response with latest version. If still an issue, let us know and we'd be happy to further look at it.

@aBurmeseDev aBurmeseDev added the response-requested Waiting on additional information or feedback. label Jun 5, 2024
@yotam-medini
Copy link

yotam-medini commented Jun 5, 2024 via email

@github-actions github-actions bot removed the response-requested Waiting on additional information or feedback. label Jun 6, 2024
Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
batch p3 This is a minor priority issue service-api This issue is caused by the service API, not the SDK implementation.
Projects
None yet
Development

No branches or pull requests

3 participants