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

AWS: switch from containerProperties to ecsProperties #5391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tom-seqera
Copy link
Contributor

Closes #5096

Use EcsProperties instead of ContainerProperties to configure AWS Batch jobs.

See AWS docs

Copy link

netlify bot commented Oct 10, 2024

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 418cf0f
🔍 Latest deploy log https://app.netlify.com/sites/nextflow-docs-staging/deploys/67093922399ebe00083e8c46

@tom-seqera tom-seqera marked this pull request as ready for review October 10, 2024 15:24
@@ -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
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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

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

Successfully merging this pull request may close these issues.

AWS: Switch from containerProperties to ecsProperties
2 participants