Skip to content

Aws sdk migration#1845

Open
IvanBorislavovDimitrov wants to merge 5 commits into
masterfrom
aws-sdk-migration
Open

Aws sdk migration#1845
IvanBorislavovDimitrov wants to merge 5 commits into
masterfrom
aws-sdk-migration

Conversation

@IvanBorislavovDimitrov

Copy link
Copy Markdown
Contributor

No description provided.

@IvanBorislavovDimitrov IvanBorislavovDimitrov force-pushed the aws-sdk-migration branch 11 times, most recently from 616a49d to 2a642fa Compare May 27, 2026 14:15
@cloudfoundry cloudfoundry deleted a comment from sonarqubecloud Bot Jun 1, 2026

@Yavor16 Yavor16 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The azure sdk files are also shown as deleted in this PR. Maybe if you rebase, it will remove from the PR

Comment thread multiapps-controller-persistence/src/main/java/module-info.java
Comment thread pom.xml Outdated
<immutables.version>2.12.1</immutables.version>
<micrometer.version>1.16.4</micrometer.version>
<aliyun-sdk-oss.version>3.18.5</aliyun-sdk-oss.version>
<aws.sdk.version>2.44.12</aws.sdk.version>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merge you can bump the version because they release new version very frequently

LMCROSSITXSADEPLOY-3315
Previously testConnection probed for a non-existent test object on the
underlying store, which produced misleading results when the bucket or
container itself was missing. The check now explicitly verifies that the
target bucket/container exists and throws IllegalStateException with a
clear OBJECT_STORE_BUCKET_NOT_FOUND message when it does not, making
configuration errors fail fast with an actionable diagnostic.

LMCROSSITXSADEPLOY-3315
@IvanBorislavovDimitrov IvanBorislavovDimitrov force-pushed the aws-sdk-migration branch 6 times, most recently from 6489244 to 50c2cfc Compare June 8, 2026 09:08
@sonarqubecloud

Copy link
Copy Markdown


private int deleteByFilterAndCount(BiPredicate<String, Map<String, String>> predicate) {
List<String> toDelete = new ArrayList<>();
try (ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we manage some central executor service at class level?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it is not needed, because the creation is cheap and no need to manage the lifecycle of the pool like shutdowning it. It is a virtual thread pool, the threads are not os threads.

}
}

private static final class CredentialKeys {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why whole new class only with constants? Can we just keep constants in the same class or at least extract them into existing Constant class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So every SDK to manage the credentials it needs. It seems more readable for me, but if you think it is less readable can refactor it?

}
}

// BlobStore::list may not return a complete list, making this method unreliable

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still true?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not really sure, but the Jclouds will only be used for now for Ali cloud, and will be deleted after this migration so I guess its fine to leave it as is.

public static final String DELETED_0_SECRET_TOKENS_WITH_EXPIRATION_DATE_1 = "Deleted secret tokens \"{0}\" with an expiration date \"{1}\"";
public static final String FAILED_TO_DELETE_FILE_0_IN_OBJECT_STORE_REASON_1 = "Failed to delete file \"{0}\" in object store. Reason: {1}";
public static final String S3_UPLOAD_FAILED_FILE_0_SIZE_1 = "S3 upload failed for file \"{0}\" (size={1}). Root cause chain: {2}";
public static final String BYTES_RANGE_0_1 = "bytes=%d-%d";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not exactly a message. I think this is for Constant class.

if (hasJobStuck(existingJob)) {
LOGGER.warn(MessageFormat.format(Messages.JOB_WITH_ID_WAS_NOT_UPDATED_WITHIN_SECONDS_ON_START_0_1, existingJob.getId(),
UPDATE_JOB_TIMEOUT));
LOGGER.warn(MessageFormat.format(Messages.STALE_JOB_DETAILS_0_1_2_3_4_5_6_7_8_9_10, existingJob.getId(), existingJob.getState(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just add default method in AsyncUploadJobEntry class which returns build string and avoid formatting in place.

LOGGER.info(Messages.JOB_WITH_ID_WAS_NOT_UPDATED_WITHIN_SECONDS, job.getId(), UPDATE_JOB_TIMEOUT);
LOGGER.warn(MessageFormat.format(Messages.JOB_WITH_ID_WAS_NOT_UPDATED_WITHIN_SECONDS_ON_GET_0_1, job.getId(),
UPDATE_JOB_TIMEOUT));
LOGGER.warn(MessageFormat.format(Messages.STALE_JOB_DETAILS_0_1_2_3_4_5_6_7_8_9_10, job.getId(), job.getState(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same can be applied here

private static final Logger LOGGER = LoggerFactory.getLogger(AsyncUploadJobOrchestrator.class);

private final ResilientOperationExecutor resilientOperationExecutor = getResilientOperationExecutor();
private final FileUploadResilientOperationExecutor fileUploadResilientOperationExecutor = getFileUploadResilientOperationExecutor();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What ResilientOperationExecutor can't do and it's necessary to add additional resilient executor?

public static final String CONTAINER_URI = "container_uri";
public static final String BASE_64_ENCODED_PRIVATE_KEY_DATA = "base64EncodedPrivateKeyData";
public static final String HOST = "host";
public static final Set<String> OBJECT_STORE_CUSTOM_REGIONS = Set.of("eu-south-1");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need from custom regions?

public static final String BASE_64_ENCODED_PRIVATE_KEY_DATA = "base64EncodedPrivateKeyData";
public static final String HOST = "host";
public static final Set<String> OBJECT_STORE_CUSTOM_REGIONS = Set.of("eu-south-1");
public static final String OBJECT_STORE_JCLOUDS_REGIONS = "jclouds.regions";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we need this?

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.

3 participants