-
Notifications
You must be signed in to change notification settings - Fork 628
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
AWS: switch from containerProperties to ecsProperties #5391
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nextflow-docs-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
plugins/nf-amazon/src/main/nextflow/cloud/aws/batch/AwsBatchHelper.groovy
Outdated
Show resolved
Hide resolved
28c6034
to
4f8b192
Compare
@@ -181,7 +181,9 @@ class AwsBatchHelper { | |||
final response = batchClient.describeJobs(request) | |||
if( response.jobs ) { | |||
final detail = response.jobs[0] | |||
return detail.container.logStreamName | |||
return detail.ecsProperties?.taskProperties[0]?.containers[0]?.logStreamName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if with an empty list [0]
returns IndexOutOfBoundException
, may be it's better to wrap this (and other similar) in helper method and use if try/catch(Exception) returning a null
if something is going wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checked and it seems emptyList[0]
returns null so I think that's fine. Unfortunately obj.nullList[0]
throws a NPE.
This is a bit awkward, but would work:
detail.ecsProperties?.taskProperties?[0]?.containers?[0]?.logStreamName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too ugly, make sense to have little helper method
Signed-off-by: Tom Sellman <[email protected]>
4f8b192
to
418cf0f
Compare
Closes #5096
Use EcsProperties instead of ContainerProperties to configure AWS Batch jobs.
See AWS docs