Fix AWS Batch machine type trace for new instance families#6952
Open
FloWuenne wants to merge 1 commit intonextflow-io:masterfrom
Open
Fix AWS Batch machine type trace for new instance families#6952FloWuenne wants to merge 1 commit intonextflow-io:masterfrom
FloWuenne wants to merge 1 commit intonextflow-io:masterfrom
Conversation
Signed-off-by: FloWuenne <flowuenne@gmail.com>
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Member
|
I believe the proper solution is to update the aws sdk |
Author
|
@pditommaso From codex checking the AWS SDK, these instance types are not yet in the official enum from the newest version (might be wrong but double check). |
Member
Member
|
But I agree this prevent updating to latest sdk to have access to latest types. |
pditommaso
reviewed
Mar 20, 2026
| } | ||
|
|
||
| protected String getInstanceType(Instance instance) { | ||
| instance.instanceTypeAsString() ?: instance.instanceType()?.toString() |
Member
There was a problem hiding this comment.
May not make more sense ?
instance.instanceType()?.toString() ?: instance.instanceTypeAsString()
Author
There was a problem hiding this comment.
I don't think so because instance.instanceType()?.toString() will be UNKNOWN_TO_SDK_VERSION, not null and therefore it's not invalidated and instance.instanceTypeAsString() would never run?
Not 100% sure here though!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR fixes AWS Batch trace machine type propagation for newer EC2 instance families whose names are not yet recognized by the pinned AWS SDK enum list.
Nextflow was resolving the machine type through
instance.instanceType().toString(), which depends on the generated SDK enum. For newer families such asr8id.xlarge,m8id.xlarge, andc8id.xlarge, the current SDK maps the typed accessor toUNKNOWN_TO_SDK_VERSIONinstead of preserving the raw instance type string.This change switches the AWS Batch helper to prefer
instance.instanceTypeAsString()and only fall back to the enum value if needed. That makes the trace path resilient to newly released EC2 instance families and ensures the machine type value can be propagated correctly downstream.Changes
AwsBatchHelperr8id.xlarge,m8id.xlarge, andc8id.xlargetoUNKNOWN_TO_SDK_VERSIONTesting
./gradlew :plugins:nf-amazon:test --tests 'nextflow.cloud.aws.batch.AwsBatchHelperTest'Notes