Skip to content

REP-6875 Augment /progress API endpoint #1269

REP-6875 Augment /progress API endpoint

REP-6875 Augment /progress API endpoint #1269

Workflow file for this run

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
workflow_dispatch:
env:
replsetSrcConnStr: mongodb://localhost:27020,localhost:27021,localhost:27022
replsetDstConnStr: mongodb://localhost:27030,localhost:27031,localhost:27032
shardedSrcConnStr: mongodb://localhost:27020
shardedDstConnStr: mongodb://localhost:27030
jobs:
basics:
strategy:
fail-fast: false
matrix:
include:
# NB: This is the only setup we’re supporting with 4.0.
- mongodb_versions: [ '4.0', '8.0' ]
topology: replset
# Testing fallback when `hello` isn’t implemented
# (but appendOplogNote is).
- mongodb_versions: [ '4.2.5', '6.0' ]
topology: replset
exclude:
- mongodb_versions: [ '4.2', '4.2' ]
toHashedIndexKey: true
- mongodb_versions: [ '4.2', '4.4' ]
toHashedIndexKey: true
- mongodb_versions: [ '4.2', '5.0' ]
toHashedIndexKey: true
- mongodb_versions: [ '4.2', '6.0' ]
toHashedIndexKey: true
- mongodb_versions: [ '4.2', '8.0' ]
toHashedIndexKey: true
# versions are: source, destination
mongodb_versions:
- [ '4.2', '4.2' ]
- [ '4.2', '4.4' ]
- [ '4.2', '5.0' ]
- [ '4.2', '6.0' ]
- [ '4.2', '8.0' ]
- [ '4.4', '4.4' ]
- [ '4.4', '5.0' ]
- [ '4.4', '6.0' ]
- [ '4.4', '8.0' ]
- [ '5.0', '5.0' ]
- [ '5.0', '6.0' ]
- [ '5.0', '7.0' ]
- [ '5.0', '8.0' ]
- [ '6.0', '6.0' ]
- [ '6.0', '7.0' ]
- [ '6.0', '8.0' ]
- [ '7.0', '7.0' ]
- [ '7.0', '8.0' ]
- [ '8.0', '8.0' ]
toHashedIndexKey: [true, false]
topology:
- replset
- replset-to-sharded
- sharded
# Ubuntu 24 lacks OpenSSL 1.1.1’s libcrypto, which pre-v6 MongoDB
# versions need.
runs-on: ubuntu-22.04
name: ${{ matrix.mongodb_versions[0] }} to ${{ matrix.mongodb_versions[1] }}, ${{ matrix.topology }}${{ matrix.toHashedIndexKey && ', hashed doc compare' || '' }}
steps:
- run: uname -a
- run: ldconfig -p
- run: lsb_release -a
- name: Check out repository
uses: actions/checkout@v4
- name: Fetch Go
uses: actions/setup-go@v5
with:
go-version: stable
# Use an old pymongo so we can install MongoDB 4.0.
- name: Install m and mtools
run: |-
{
echo npm install -g m
echo pip install pymongo==4.10.1 'mtools[all]'
} | parallel
- name: Install MongoDB ${{ matrix.mongodb_versions[0] }} (source)
run: yes | m ${{ matrix.mongodb_versions[0] }} && dirname $(readlink $(which mongod)) > .srcpath
- name: Install MongoDB ${{ matrix.mongodb_versions[1] }} (destination)
run: yes | m ${{ matrix.mongodb_versions[1] }} && dirname $(readlink $(which mongod)) > .dstpath
- name: Install latest stable MongoDB (metadata)
run: yes | m stable && dirname $(readlink $(which mongod)) > .metapath
- name: Build migration-verifier & start clusters
run: |-
{
echo ./build.sh
echo mlaunch init --binarypath $(cat .srcpath) --port 27020 --dir src --replicaset ${{ (matrix.topology == 'sharded') && '--sharded 2' || '' }}
echo mlaunch init --binarypath $(cat .dstpath) --port 27030 --dir dst --replicaset ${{ (matrix.topology == 'sharded' || matrix.topology == 'replset-to-sharded') && '--sharded 2' || '' }}
echo mlaunch init --binarypath $(cat .metapath) --port 27040 --dir meta --replicaset --nodes 1
} | parallel
- name: Test
run: go test -v ./... -race
env:
MVTEST_DOC_COMPARE_METHOD: ${{matrix.toHashedIndexKey && 'toHashedIndexKey' || ''}}
MVTEST_SRC: ${{ (matrix.topology == 'sharded') && env.shardedSrcConnStr || env.replsetSrcConnStr }}
MVTEST_DST: ${{ (matrix.topology == 'sharded' || matrix.topology == 'replset-to-sharded') && env.shardedDstConnStr || env.replsetDstConnStr }}
MVTEST_META: mongodb://localhost:27040