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

Attribute (StartedAt) is required - Batch DescribeJobs #400

Open
srchulo opened this issue Mar 11, 2021 · 3 comments
Open

Attribute (StartedAt) is required - Batch DescribeJobs #400

srchulo opened this issue Mar 11, 2021 · 3 comments

Comments

@srchulo
Copy link

srchulo commented Mar 11, 2021

I'm getting an error when calling DescribeJobs that says that StartedAt is required, but it looks like it's not being returned by the AWS Batch API call. I'm not sure if this is a mistake by AWS, or PAWS? It looks like AWS is not returning StartedAt because the job is still in the SUBMITTED state.

my $describe_response = $self->batch->DescribeJobs(Jobs => [$job_id]);
Attribute (StartedAt) is required at /home/user/local/lib/perl5/x86_64-linux-gnu/Moose/Object.pm line 24
        Moose::Object::new('Paws::Batch::JobDetail', 'Container', 'Paws::Batch::ContainerDetail=HASH(0x55e84d3132f0)', 'CreatedAt', 1615430870067, 'Status', 'SUBMITTED', 'JobId', '1907efa4-6936-48d0-af27-c48290874365', 'Attempts', 'ARRAY(0x55e84d28d210)', 'Parameters', 'Paws::Batch::ParametersMap=HASH(0x55e84d3305d8)', 'JobName', 'my-job', 'DependsOn', 'ARRAY(0x55e84d223d10)', 'JobDefinition', 'xxxx', 'JobQueue', 'xxxxxxx') called at /home/user/local/lib/perl5/Paws/Net/RestJsonResponse.pm line 195
        Paws::Net::RestJsonResponse::new_from_result_struct('Paws::Net::RestJsonResponse=HASH(0x55e84d0dc0d0)', 'Paws::Batch::JobDetail', 'HASH(0x55e84d18bd58)') called at /home/user/local/lib/perl5/Paws/Net/RestJsonResponse.pm line 182
        Paws::Net::RestJsonResponse::new_from_result_struct('Paws::Net::RestJsonResponse=HASH(0x55e84d0dc0d0)', 'Paws::Batch::DescribeJobsResponse', 'HASH(0x55e84d1f2b40)') called at /home/user/local/lib/perl5/Paws/Net/RestJsonResponse.pm line 229
        Paws::Net::RestJsonResponse::new_from_response('Paws::Net::RestJsonResponse=HASH(0x55e84d0dc0d0)', 'Paws::Batch::DescribeJobsResponse', 'Paws::Net::APIResponse=HASH(0x55e84d209fd0)', '2aaa7c1b-8a38-4731-8c92-a89e501f9fae') called at /home/user/local/lib/perl5/Paws/Net/RestJsonResponse.pm line 212
        Paws::Net::RestJsonResponse::response_to_object('Paws::Net::RestJsonResponse=HASH(0x55e84d0dc0d0)', 'Paws::Batch::DescribeJobs=HASH(0x55e84cbafb68)', 'Paws::Net::APIResponse=HASH(0x55e84d209fd0)') called at /home/user/local/lib/perl5/Paws/Net/RestJsonResponse.pm line 23
        Paws::Net::RestJsonResponse::process('Paws::Net::RestJsonResponse=HASH(0x55e84d0dc0d0)', 'Paws::Batch::DescribeJobs=HASH(0x55e84cbafb68)', 'Paws::Net::APIResponse=HASH(0x55e84d209fd0)') called at /home/user/local/lib/perl5/Paws/Net/Caller.pm line 46
        Paws::Net::Caller::caller_to_response('Paws::Net::Caller=HASH(0x55e84bb21140)', 'Paws::Batch=HASH(0x55e84ce98a88)', 'Paws::Batch::DescribeJobs=HASH(0x55e84cbafb68)', 'Paws::Net::APIResponse=HASH(0x55e84d209fd0)') called at /home/user/local/lib/perl5/Paws/Net/RetryCallerRole.pm line 19
        Paws::Net::RetryCallerRole::do_call('Paws::Net::Caller=HASH(0x55e84bb21140)', 'Paws::Batch=HASH(0x55e84ce98a88)', 'Paws::Batch::DescribeJobs=HASH(0x55e84cbafb68)') called at /home/user/local/lib/perl5/Paws/Batch.pm line 65
@pplu
Copy link
Owner

pplu commented Mar 11, 2021

Does taking required => 1 out of Paws/Batch/JobDetail.pm StartedAt attribute solve the problem?

@srchulo
Copy link
Author

srchulo commented Mar 11, 2021

Yes

@Prajithp
Copy link

Looks like this is a mistake by AWS. As per the documentation and botocore api json, the StartedAt parameter is required.

https://docs.aws.amazon.com/batch/latest/APIReference/API_JobDetail.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants