Skip to content

Ensure all modules are included in INTEG_TEST testcluster distribution#20241

Merged
cwperks merged 3 commits intoopensearch-project:mainfrom
cwperks:use-all-modules
Dec 15, 2025
Merged

Ensure all modules are included in INTEG_TEST testcluster distribution#20241
cwperks merged 3 commits intoopensearch-project:mainfrom
cwperks:use-all-modules

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Dec 15, 2025

Description

This PR ensures that all modules are included when using the INTEG_TEST testcluster distribution. Currently, when using a testcluster with INTEG_TEST distribution, only modules matching transport-* are included and as a result many plugins cannot use this distribution adequately because its missing modules like autotagging-commons.

Related Issues

See discussion on #20229

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

Summary by CodeRabbit

  • Chores
    • Refactored build/distribution to replace transport-specific module handling with an integ-test focused workflow and updated archive handling for INTEG_TEST distributions.
  • Documentation
    • Changelog updated to note ensuring all modules are included in the INTEG_TEST testcluster distribution.
  • Tests
    • Adjusted painless REST test YAML to target the correct context index.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks requested a review from a team as a code owner December 15, 2025 16:59
@cwperks
Copy link
Member Author

cwperks commented Dec 15, 2025

I'll add a CHANGELOG entry once the CHANGELOG is cleared for 3.5.0.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Walkthrough

Replaces transport-specific distribution outputs and tasks with integ-test equivalents and updates the archiveFiles helper signature and its call site used by the integTest ZIP archive. Also updates CHANGELOG and a test YAML index reference.

Changes

Cohort / File(s) Summary
Archive helper & call site
distribution/archives/build.gradle
archiveFiles signature updated to accept a platform parameter; integTestZip now invokes archiveFiles(integTestModulesFiles, 'zip', null, 'x64', JavaPackageType.NONE) instead of using transport modules.
Distribution tasks, outputs & module copy logic
distribution/build.gradle
Removed transport-specific declarations and tasks (transportOutputs, processTransportOutputsTaskProvider, buildTransportModulesTaskProvider, transportModulesFiles); added integTestOutputs, processIntegTestModulesOutputsTaskProvider, buildIntegTestModulesTaskProvider, and integTestModulesFiles; per-module copy and public copy destinations now use the integ-test task providers and outputs.
Changelog
CHANGELOG.md
Added Unreleased 3.x entry: "Ensure all modules are included in INTEG_TEST testcluster distribution".
Test YAML
modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml
Adjusted the targeted context index from contexts.25 to contexts.26.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20–30 minutes

  • Verify no remaining references to transport outputs/modules remain across the repo.
  • Confirm task names, dependencies, and outputs.dir values for the new integ-test tasks.
  • Ensure archiveFiles signature change is consistent wherever else it's used.
  • Review the changelog entry placement and the YAML index change for test correctness.

Poem

🐰 I hopped through Gradle, nose a-twitch,
Swapped old transport paths for integ-test stitch,
Tasks lined up, archives set to race,
Modules gathered in their new place,
A tiny carrot cheer for the build’s new trick 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: ensuring all modules are included in INTEG_TEST testcluster distribution, which directly addresses the core modification across the build files.
Description check ✅ Passed The PR description includes the required Description and Related Issues sections with clear context and explanation, though the Check List items remain unchecked as they were likely not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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.

@github-actions
Copy link
Contributor

❌ Gradle check result for c55e048: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@cwperks cwperks added the backport 3.4 Backport to 3.4 branch label Dec 15, 2025
@andrross
Copy link
Member

I'll add a CHANGELOG entry once the CHANGELOG is cleared for 3.5.0.

@cwperks This has already happened.

@cwperks
Copy link
Member Author

cwperks commented Dec 15, 2025

pushing a new commit, 1 min

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@andrross
Copy link
Member

many plugins cannot use this distribution adequately because its missing modules like autotagging-commons

@cwperks Are plugins commonly taking dependencies on other modules like autotagging-commons? Or does the server not properly start up without things injected via modules?

@cwperks
Copy link
Member Author

cwperks commented Dec 15, 2025

many plugins cannot use this distribution adequately because its missing modules like autotagging-commons

@cwperks Are plugins commonly taking dependencies on other modules like autotagging-commons? Or does the server not properly start up without things injected via modules?

security extends autotagging-commons so this impacts any plugin that has a test with security that uses testclusters instead of docker

@dbwiddis
Copy link
Member

security extends autotagging-commons so this impacts any plugin that has a test with security that uses testclusters instead of docker

The issue in #20226 (which #20229 tries to fix) is failing without-security. Will this fix impact that use case?

@github-actions
Copy link
Contributor

❌ Gradle check result for b02fc6b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@cwperks
Copy link
Member Author

cwperks commented Dec 15, 2025

@dbwiddis The purpose of this is so that we can replace all instances of ARCHIVE in the ccr repo with INTEG_TEST. When using ARCHIVE it downloads the min distribution and uses the gradle cache, when using INTEG_TEST it does everything entirely in the build/ directory. I need to look at the CCR error in more detail, but none-the-less I think this is a change we should consume. It definitely brings more predictability to the CI.

@dbwiddis
Copy link
Member

Removing backport tag as #20243 accomplishes that.

@dbwiddis dbwiddis removed the backport 3.4 Backport to 3.4 branch label Dec 15, 2025
@github-actions
Copy link
Contributor

❌ Gradle check result for b02fc6b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b02fc6b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b02fc6b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for b02fc6b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@dbwiddis
Copy link
Member

Gradle check keeps failing on org.opensearch.painless.LangPainlessClientYamlTestSuiteIT.test {yaml=painless/71_context_api/Action to list contexts}.

Does not appear to previously have been flaky. Last element of the context array now includes update rather than the test's terms_set. Is this related?

Stash dump on test failure [{
  "stash" : {
    "body" : {
      "contexts" : [
        "aggregation_selector",
<snip>
        "template",
        "terms_set",
        "update"
      ]
    }
  }
}]

@cwperks
Copy link
Member Author

cwperks commented Dec 15, 2025

yea the test is written in a way to run against a testcluster and would fail against the min distribution. Updating the test now.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml (1)

4-5: Confirm new index and consider brittleness of order‑based assertion

Changing the assertion from a lower index to contexts.26 for "update" makes sense if a new context was inserted earlier, but this test is tightly coupled to the exact ordering of the contexts array. That will break again whenever another context is added or re-ordered.

At minimum, please:

  • Re‑run LangPainlessClientYamlTestSuiteIT (or the relevant Gradle task) to confirm that contexts.26 is the correct index for "update" with the new distribution layout.
  • Add a short comment explaining that the index is expected to move when contexts are added, to make future updates more obvious.

If the YAML test framework ever supports more flexible matching (e.g., searching by value rather than fixed index), it would be worth refactoring this test at that time to avoid hard‑coding the array position.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b02fc6b and 7091973.

📒 Files selected for processing (1)
  • modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/test/painless/71_context_api.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: check-files
  • GitHub Check: precommit (21, windows-2025, true)
  • GitHub Check: precommit (25, ubuntu-latest)
  • GitHub Check: precommit (21, ubuntu-latest)
  • GitHub Check: precommit (25, macos-15-intel)
  • GitHub Check: precommit (21, windows-latest)
  • GitHub Check: precommit (21, ubuntu-24.04-arm)
  • GitHub Check: precommit (25, ubuntu-24.04-arm)
  • GitHub Check: precommit (21, macos-15)
  • GitHub Check: precommit (25, windows-latest)
  • GitHub Check: precommit (25, macos-15)
  • GitHub Check: precommit (21, macos-15-intel)
  • GitHub Check: assemble (21, ubuntu-24.04-arm)
  • GitHub Check: detect-breaking-change
  • GitHub Check: assemble (25, windows-latest)
  • GitHub Check: assemble (25, ubuntu-24.04-arm)
  • GitHub Check: assemble (25, ubuntu-latest)
  • GitHub Check: assemble (21, ubuntu-latest)
  • GitHub Check: assemble (21, windows-latest)
  • GitHub Check: Analyze (java)

@github-actions
Copy link
Contributor

✅ Gradle check result for 7091973: SUCCESS

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.28%. Comparing base (1022486) to head (7091973).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20241      +/-   ##
============================================
+ Coverage     73.20%   73.28%   +0.08%     
- Complexity    71766    71802      +36     
============================================
  Files          5795     5795              
  Lines        328302   328303       +1     
  Branches      47283    47283              
============================================
+ Hits         240345   240611     +266     
+ Misses        68628    68400     -228     
+ Partials      19329    19292      -37     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cwperks cwperks merged commit 668c92a into opensearch-project:main Dec 15, 2025
51 checks passed
tanik98 pushed a commit to tanik98/OpenSearch that referenced this pull request Feb 18, 2026
opensearch-project#20241)

* Ensure all modules are included in INTEG_TEST testcluster distribution

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add CHANGELOG entry

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix test

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
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