Skip to content

Upgrade to AWS Java SDK v2 #6165

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ The following settings are available:
: The maximum number of retry attempts for failed retryable requests (default: `-1`).

`aws.client.protocol`
: :::{deprecated} 25.06.0-edge
This option is no longer supported.
:::
: The protocol to use when connecting to AWS. Can be `http` or `https` (default: `'https'`).

`aws.client.proxyHost`
Expand All @@ -231,6 +234,11 @@ The following settings are available:
`aws.client.proxyPort`
: The port to use when connecting through a proxy.

`aws.client.proxyScheme`
: :::{versionadded} 25.06.0-edge
:::
: The protocol scheme to use when connecting through a proxy. Can be `http` or `https` (default: `'http'`).

`aws.client.proxyUsername`
: The user name to use when connecting through a proxy.

Expand All @@ -249,9 +257,15 @@ The following settings are available:
: The name of the signature algorithm to use for signing requests made by the client.

`aws.client.socketSendBufferSizeHint`
: :::{deprecated} 25.06.0-edge
This option is no longer supported.
:::
: The Size hint (in bytes) for the low level TCP send buffer (default: `0`).

`aws.client.socketRecvBufferSizeHint`
: :::{deprecated} 25.06.0-edge
This option is no longer supported.
:::
: The Size hint (in bytes) for the low level TCP receive buffer (default: `0`).

`aws.client.socketTimeout`
Expand Down
8 changes: 6 additions & 2 deletions modules/nf-commons/src/main/nextflow/file/FileHelper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,9 @@ class FileHelper {

@Override
FileVisitResult visitFile(Path fullPath, BasicFileAttributes attrs) throws IOException {
final path = folder.relativize(fullPath)
final path = fullPath.isAbsolute()
? folder.relativize(fullPath)
: fullPath
log.trace "visitFiles > file=$path; includeFile=$includeFile; matches=${matcher.matches(path)}; isRegularFile=${attrs.isRegularFile()}"

if (includeFile && matcher.matches(path) && (attrs.isRegularFile() || (options.followLinks == false && attrs.isSymbolicLink())) && (includeHidden || !isHidden(fullPath))) {
Expand Down Expand Up @@ -912,7 +914,9 @@ class FileHelper {
}

static protected Path relativize0(Path folder, Path fullPath) {
def result = folder.relativize(fullPath)
final result = fullPath.isAbsolute()
? folder.relativize(fullPath)
: fullPath
String str
if( folder.is(FileSystems.default) || !(str=result.toString()).endsWith('/') )
return result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ The protocol (i.e. HTTP or HTTPS) to use when connecting to AWS.
""")
public int proxyPort;

@ConfigOption
@Description("""
The protocol scheme to use when connecting through a proxy (http/https).
""")
public String proxyScheme;

@ConfigOption
@Description("""
The user name to use when connecting through a proxy.
Expand Down
25 changes: 14 additions & 11 deletions plugins/nf-amazon/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,20 @@ dependencies {
compileOnly 'org.pf4j:pf4j:3.12.0'

api ('javax.xml.bind:jaxb-api:2.4.0-b180830.0359')
api ('com.amazonaws:aws-java-sdk-s3:1.12.777')
api ('com.amazonaws:aws-java-sdk-ec2:1.12.777')
api ('com.amazonaws:aws-java-sdk-batch:1.12.777')
api ('com.amazonaws:aws-java-sdk-iam:1.12.777')
api ('com.amazonaws:aws-java-sdk-ecs:1.12.777')
api ('com.amazonaws:aws-java-sdk-logs:1.12.777')
api ('com.amazonaws:aws-java-sdk-codecommit:1.12.777')
api ('com.amazonaws:aws-java-sdk-sts:1.12.777')
api ('com.amazonaws:aws-java-sdk-ses:1.12.777')
api ('software.amazon.awssdk:sso:2.26.26')
api ('software.amazon.awssdk:ssooidc:2.26.26')
api ('software.amazon.awssdk:s3:2.31.64')
api ('software.amazon.awssdk:ec2:2.31.64')
api ('software.amazon.awssdk:batch:2.31.64')
api ('software.amazon.awssdk:iam:2.31.64')
api ('software.amazon.awssdk:ecs:2.31.64')
api ('software.amazon.awssdk:cloudwatchlogs:2.31.64')
api ('software.amazon.awssdk:codecommit:2.31.64')
api ('software.amazon.awssdk:sts:2.31.64')
api ('software.amazon.awssdk:ses:2.31.64')
api ('software.amazon.awssdk:sso:2.31.64')
api ('software.amazon.awssdk:ssooidc:2.31.64')
api ('software.amazon.awssdk:s3-transfer-manager:2.31.64')
api ('software.amazon.awssdk:apache-client:2.31.64')
api ('software.amazon.awssdk:aws-crt-client:2.31.64')

constraints {
api 'com.fasterxml.jackson.core:jackson-databind:2.12.7.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ class AmazonPlugin extends BasePlugin {
@Override
void start() {
super.start()
// disable aws sdk v1 warning
System.setProperty("aws.java.v1.disableDeprecationAnnouncement", "true")
FileHelper.getOrInstallProvider(S3FileSystemProvider)
}

Expand Down
Loading