Skip to content

Pin MongoDB Docker image to mongo:8#370

Merged
shaypal5 merged 1 commit into
masterfrom
copilot/upgrade-ci-mongo-server-version
Apr 6, 2026
Merged

Pin MongoDB Docker image to mongo:8#370
shaypal5 merged 1 commit into
masterfrom
copilot/upgrade-ci-mongo-server-version

Conversation

Copilot AI commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

PyMongo requires MongoDB 4.2+ (wire protocol v8), but the cached mongo:latest image in CI was resolving to an older version, causing test failures across all MongoDB backend runs.

Changes

  • CI workflow (.github/workflows/ci-test.yml): mongo:latestmongo:8
  • Local dev scripts (scripts/test-local.sh, scripts/docker-compose.all-cores.yml, Makefile): same pin
  • Docs (README.rst, scripts/README-local-testing.md): updated example commands to match
Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade CI Mongo server version</issue_title>
<issue_description>When testing async Mongo caching on CI, I end up with this error:

E           pymongo.errors.ConfigurationError: Server at 127.0.0.1:27019 reports wire version 7, but this version of PyMongo requires at least 8 (MongoDB 4.2).

Report example:

Can we upgrade the Mongo server version in the CI environment? </issue_description>

<agent_instructions>Please open a PR handling this by pinning the CI's docker to mongo:8 (not 8.0).</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@shaypal5 We're using the following code to start MongoDB in Docker: ```yaml - name: Start MongoDB in docker if: matrix.backend == 'mongodb' run: | # start MongoDB in a container docker run -d -p ${{ env.CACHIER_TEST_PORT }}:27017 --name mongodb mongo:latest # wait for MongoDB to start, which is in average 5 seconds sleep 5 # show running containers docker ps -a ```

Doesn't this mean we're already using the latest Docker image for MongoDB?</comment_new>
<comment_new>@shaypal5
Isn't it better to just manually invalidate/refresh the cache explicitly? @gencurrent </comment_new>
<comment_new>@shaypal5
@copilot what do you think? Can we have something to refresh the docker images used in our CI once a month or something? Like a monthly workflow? Or in the regular CI, something that refreshes the cache on the first of every month?</comment_new>
<comment_new>@shaypal5
Oh, ok. I get it. We actually WANT to pin MongoDB to 8.0 in the CI.</comment_new>


💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Copilot AI changed the title [WIP] Upgrade CI Mongo server version to 8 Pin MongoDB Docker image to mongo:8 Mar 20, 2026
Copilot AI requested a review from shaypal5 March 20, 2026 11:40
@shaypal5 shaypal5 marked this pull request as ready for review March 20, 2026 12:01
@shaypal5 shaypal5 requested a review from Borda March 20, 2026 12:01
@codecov

codecov Bot commented Mar 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.94%. Comparing base (2986978) to head (1f59045).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #370   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files          12       12           
  Lines        1735     1735           
  Branches      218      218           
=======================================
  Hits         1734     1734           
  Partials        1        1           
Flag Coverage Δ
local 59.30% <ø> (ø)
mongodb 40.69% <ø> (ø)
postgres 43.40% <ø> (ø)
redis 46.80% <ø> (ø)
s3 42.47% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2986978...1f59045. Read the comment docs.

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

Co-authored-by: shaypal5 <917954+shaypal5@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ci GitHub Actions, pre-commit, codecov, or automation config. area: docs README, examples, contributor docs, or repo documentation. area: mongo MongoDB backend or MongoDB test services. CI impact: reliability Correctness, race, flaky-test, timeout, or robustness improvement. outcome: merged Merged into the repository. source: copilot Opened by GitHub Copilot coding agent. type: ci GitHub Actions, CI configuration, or automation workflow change. type: docs Documentation-only or documentation-focused change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade CI Mongo server version

3 participants