Skip to content

Test Elasticsearch, OpenSearch and MongoDB against every supported major version - #1593

Merged
cristianrgreco merged 10 commits into
mainfrom
claude/supported-versions-search-document
Oct 14, 2026
Merged

cristianrgreco merged 10 commits into
mainfrom
claude/supported-versions-search-document

Conversation

@cristianrgreco

@cristianrgreco cristianrgreco commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Another batch of bringing existing modules in line with the supported-versions rule proposed in #1587 (others: #1589, #1591, #1592): a module's tests cover the latest release of every major version the vendor still supports. This one removes tests for versions past end of life.

Each suite now has one IMAGES list, oldest major first and the Dockerfile image last, and runs in full against every entry with describe.each(IMAGES). The images run one after another and each image's tests run concurrently, as the single-image suite did: { concurrent: false } on describe.each, it.concurrent on the tests. Before, only the first test of each suite ran on the older images.

Module Removed (past EOL) IMAGES Source
elasticsearch 7.17.28 (7.x EOL 2026-01-15), 8.18.1 (8.18 EOL 2025-10-21) own file on 8.19.23 (EOL 2027-07-15); Dockerfile image (9.5) in the main file endoflife.date
opensearch none; 2.19.2 → 2.19.6 2.19.6 (maintenance, no EOL date), Dockerfile (3.9) endoflife.date
mongodb 6.0.25 (EOL 2025-07-31), 4.4.29 (EOL 2024-02-29) 7.0.43 (EOL 2027-08-31), 8.3.11 (EOL 2029-10-31), Dockerfile (9.0) endoflife.date

Notes:

  • Elasticsearch 8 has its own test file, elasticsearch-container-v8.test.ts, because it needs its own client. The 9.x @elastic/elasticsearch client can't talk to Elasticsearch 8 (it sends a compatible-with=9 media type and gets media_type_header_exception on requests with a body), so the 8.x client is added as a dev dependency under the alias @elastic/elasticsearch-8 and that file imports it. elasticsearch-container.test.ts keeps the Dockerfile image and the 9.x client. All four tests, including "should index a document", run on both majors. The docs page now lists both client majors, each with the Elasticsearch major it goes with.
  • Both Elasticsearch files run their tests one at a time (concurrent: false). Vitest runs the two files in parallel, so with concurrent tests eight Elasticsearch nodes would start at once. Even five at once, as on main, already takes 114 to 157 s per test on CI against a 180 s timeout, while a test with little else running takes 21 to 50 s. One test per file keeps it to two nodes. Locally the two files together went from 100 s (only the 8 file sequential) to 83 s.
  • Dependabot may propose moving the alias to 9.x; that bump has to be held back while Elasticsearch 8 is supported.
  • MongoDB Atlas Local has its own image and class, so its suite loops too: mongodb/mongodb-atlas-local:7.0.43, then the Dockerfile image (8.3). The image has no lifecycle page of its own; its tags follow the MongoDB server versions, and 7.0 and 8.x are both still published.

The module code that only served the removed MongoDB versions is removed separately in #1597.

Verification

Local, macOS arm64, Docker Desktop. Only the older lines were run locally:

Run Result
npx vitest run packages/modules/elasticsearch 8 passed in 2 files: four tests on 8.19.23 with the 8.x client and four on the Dockerfile image with the 9.x client. With the 9.x client on 8.19, "should index a document" failed with media_type_header_exception
npx vitest run packages/modules/opensearch --maxConcurrency=2 -t "2.19.6" 6 passed
npx vitest run packages/modules/mongodb/src/mongodb-container.test.ts --maxConcurrency=2 -t "7.0.43|8.3.11" 4 passed
  • npm run format, npm run lint, npm run knip: clean.
  • Every inside_block marker used by the three docs pages still resolves to one block.

Left to CI: the Dockerfile image's share of each loop, Podman, Node 22 and 24, linux/amd64, and the docs build.

Container starts per run: elasticsearch 6 → 8, opensearch 6 → 10, mongodb 4 → 6, Atlas Local 6 → 12 (6 passed locally on 7.0.43). Elasticsearch and OpenSearch are the two slowest module jobs, so their CI times are the ones to check here.

Baseline job times on main (run 38287125470, docker 22 / docker 24 / podman 22 / podman 24, seconds): elasticsearch 166/176/212/185, opensearch 152/169/197/196, mongodb 94/82/123/129.

Not breaking

Test files, one docs sentence, and a dev dependency of @testcontainers/elasticsearch (package-lock.json adds only the aliased 8.x client and its own dependencies). No module source, exports or Dockerfile changed.

@cristianrgreco cristianrgreco changed the title Test Elasticsearch, OpenSearch and MongoDB against their supported versions Test Elasticsearch, OpenSearch and MongoDB against every supported major version Oct 13, 2026
@cristianrgreco
cristianrgreco marked this pull request as ready for review October 14, 2026 12:42
@cristianrgreco
cristianrgreco merged commit fc9e1db into main Oct 14, 2026
191 checks passed
@cristianrgreco
cristianrgreco deleted the claude/supported-versions-search-document branch October 14, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant