Skip to content

Confluence and CloudWatch and multiple other failing tests fix#6348

Merged
san81 merged 11 commits into
opensearch-project:mainfrom
san81:confluence-test-case-fix
Dec 10, 2025
Merged

Confluence and CloudWatch and multiple other failing tests fix#6348
san81 merged 11 commits into
opensearch-project:mainfrom
san81:confluence-test-case-fix

Conversation

@san81

@san81 san81 commented Dec 10, 2025

Copy link
Copy Markdown
Collaborator

Description

Fixing two failing tests:

  • Jira and Confluence host name change to fix the failing tests
  • We need to explicitly build the RetryPolicy object instead of using the consumer pattern when using "ADAPTIVE_V2". This api is also marked as depecreated and expected to be replaced by RetryStrategy but thats a bigger exercise we will take up clean up all RetryPolicy occurrences together.
  • Fix OutOfMemoryError in CloudWatchLogsServiceTest by replacing String.repeat() with RandomStringUtils.randomAlphabetic() to generate test data of correct size (25MB)
    instead of excessive repetitions (~288GB)
  • Date format validation fix randomly failing when UUID string generates a string that actually passes Date format validation. Removed UUID usage here. Made the test more reliable
  • Added Await-ability for more consistent validation in the DDB source coordination test

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
…_V2 retry mode and requires using RetryStrategy instead.

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
@san81 san81 changed the title Confluence host name change to fix the failing tests Confluence and CloudWatch failing tests fix Dec 10, 2025
san81 added 8 commits December 9, 2025 17:27
….repeat() with RandomStringUtils.randomAlphabetic() to generate test data of correct size (25MB)

   instead of excessive repetitions (~288GB)

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
….repeat() with RandomStringUtils.randomAlphabetic() to generate test data of correct size (25MB)

   instead of excessive repetitions (~288GB)

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
…or instances to be registered:

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
@san81 san81 changed the title Confluence and CloudWatch failing tests fix Confluence and CloudWatch and multiple other failing tests fix Dec 10, 2025
graytaylor0
graytaylor0 previously approved these changes Dec 10, 2025

@graytaylor0 graytaylor0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for all these fixes!

@dlvenable dlvenable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for these changes!

final Optional<SourcePartitionStoreItem> maybeAcquired =
objectUnderTest.tryAcquireAvailablePartition(sourceIdentifier, ownerId, Duration.ofSeconds(20));
// Wait for partition to be available in DynamoDB Local before attempting to acquire
final Optional<SourcePartitionStoreItem>[] maybeAcquiredHolder = new Optional[]{Optional.empty()};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure this will actually fix the issue. I've tried this a few times and ended up disabling this test in #6328.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

There is still some sleep in that PR, which could add uncertainty. I am hoping, we can give it a try with this approach and see.

void testValidAndInvalidOutputFormats() throws NoSuchFieldException, IllegalAccessException {
setField(DateProcessorConfig.class, dateProcessorConfig, "outputFormat", random);
// Use a string with invalid pattern characters (] and [ are reserved and will always fail)
setField(DateProcessorConfig.class, dateProcessorConfig, "outputFormat", "invalid[pattern]format");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should probably an @ParameterizedTest with a few different invalid formats provided.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, converted it now.
Thought of minimizing the changes but as I am touching this, I could as well do it 👍


final ClientOverrideConfiguration.Builder configBuilder = ClientOverrideConfiguration.builder()
.retryPolicy(r -> r.numRetries(AwsConfig.DEFAULT_CONNECTION_ATTEMPTS));
.retryPolicy(retryPolicy);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you know why this improves the tests?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think, it started with AWS SDK behavior/validation changes that made the consumer pattern incompatible with the default retry mode. They now changed the default retry mode to be ADAPTIVE_V2

https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/retry-strategy.html

Ideal fix is to move to using RetryStrategy but thats a bigger change so minimized the changes here by avoiding using the consumer pattern. https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/retries/api/RetryStrategy.html

for (int i = 0; i < thresholdConfig.getBatchSize(); i++) {
JacksonEvent mockJacksonEvent = (JacksonEvent) JacksonEvent.fromMessage("testMessage".repeat((int) thresholdConfig.getMaxEventSizeBytes()));
JacksonEvent mockJacksonEvent =
(JacksonEvent) JacksonEvent.fromMessage(RandomStringUtils.insecure().nextAlphabetic(messageSize));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you know why the repeat used so much memory?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I see. It was because the original string was already long.

Signed-off-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>

@dlvenable dlvenable left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @san81 !

@san81 san81 merged commit 442cd70 into opensearch-project:main Dec 10, 2025
45 of 47 checks passed
eatulban pushed a commit to eatulban/data-prepper that referenced this pull request Dec 11, 2025
…earch-project#6348)

Making the tests less flaky. More reliable. Avoiding possible Out of memory issue with large pay load generation.
wandna-amazon pushed a commit to wandna-amazon/data-prepper that referenced this pull request Jan 8, 2026
…earch-project#6348)

Making the tests less flaky. More reliable. Avoiding possible Out of memory issue with large pay load generation.

Signed-off-by: Nathan Wand <wandna@amazon.com>
@opensearch-trigger-bot

Copy link
Copy Markdown
Contributor

The backport to 2.13 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.13 2.13
# Navigate to the new working tree
cd .worktrees/backport-2.13
# Create a new branch
git switch --create backport/backport-6348-to-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 442cd7058c5546ea6337f48c55d180fa3ac8c590
# Push it to GitHub
git push --set-upstream origin backport/backport-6348-to-2.13
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.13

Then, create a pull request where the base branch is 2.13 and the compare/head branch is backport/backport-6348-to-2.13.

1 similar comment
@opensearch-trigger-bot

Copy link
Copy Markdown
Contributor

The backport to 2.13 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.13 2.13
# Navigate to the new working tree
cd .worktrees/backport-2.13
# Create a new branch
git switch --create backport/backport-6348-to-2.13
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 442cd7058c5546ea6337f48c55d180fa3ac8c590
# Push it to GitHub
git push --set-upstream origin backport/backport-6348-to-2.13
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.13

Then, create a pull request where the base branch is 2.13 and the compare/head branch is backport/backport-6348-to-2.13.

dlvenable pushed a commit that referenced this pull request Feb 5, 2026
Making the tests less flaky. More reliable. Avoiding possible Out of memory issue with large pay load generation.

(cherry picked from commit 442cd70)
dlvenable pushed a commit that referenced this pull request Feb 5, 2026
Making the tests less flaky. More reliable. Avoiding possible Out of memory issue with large pay load generation.

(cherry picked from commit 442cd70)
dlvenable added a commit to dlvenable/data-prepper that referenced this pull request Feb 5, 2026
…roject#6348.

Taken from 442cd70

Co-authored-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Signed-off-by: David Venable <dlv@amazon.com>
dlvenable added a commit that referenced this pull request Feb 9, 2026
Taken from 442cd70

Signed-off-by: David Venable <dlv@amazon.com>
Co-authored-by: Santhosh Gandhe <1909520+san81@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants