Skip to content

Fix the flaky yamlRestTest caused by order of sample_logs#5119

Merged
yuancu merged 1 commit intoopensearch-project:mainfrom
LantaoJin:pr/issues/5118
Feb 6, 2026
Merged

Fix the flaky yamlRestTest caused by order of sample_logs#5119
yuancu merged 1 commit intoopensearch-project:mainfrom
LantaoJin:pr/issues/5118

Conversation

@LantaoJin
Copy link
Member

@LantaoJin LantaoJin commented Feb 6, 2026

Description

Patterns with specified max_sample_count should return correct result is flaky

Related Issues

Resolves #5118

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

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: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin added flaky-test Flaky build or test issue testing Related to improving software testing labels Feb 6, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 6, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Tests
    • Updated integration test setup to explicitly configure index creation and shard/replica settings before data indexing.

Walkthrough

A test configuration file is updated to add an explicit index creation step with specific shard and replica settings in the setup section, preparing the test environment before bulk document indexing.

Changes

Cohort / File(s) Summary
Test Setup Configuration
integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/4866.yml
Added indices.create operation in setup section to create hdfs_logs index with explicit shard and replica settings before bulk indexing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly refers to fixing flaky yamlRestTest caused by order of sample_logs, which directly matches the changeset that adds index creation to ensure deterministic ordering.
Description check ✅ Passed The description references the flaky test and issue #5118, which directly relates to the non-deterministic ordering problem addressed by the changeset.
Linked Issues check ✅ Passed The PR adds index creation with explicit shard/replica settings to ensure deterministic test execution, directly addressing issue #5118's root cause of non-deterministic sample_logs ordering.
Out of Scope Changes check ✅ Passed The single change adds necessary index setup configuration to the test file, which is directly in scope for fixing the flaky test described in issue #5118.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@yuancu yuancu merged commit 7313be5 into opensearch-project:main Feb 6, 2026
43 of 44 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 6, 2026
Signed-off-by: Lantao Jin <ltjin@amazon.com>
(cherry picked from commit 7313be5)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev flaky-test Flaky build or test issue testing Related to improving software testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The sample_logs array in the patterns command results had non-deterministic ordering

3 participants