Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Integration compatibility problem
description: Report behavior that disagrees with a tested compatibility result.
title: "[Compatibility] "
body:
- type: markdown
attributes:
value: |
Include a minimal reproduction with synthetic data. Do not include credentials,
connection strings containing secrets, or customer data. A passing dashboard
result covers only its listed scenarios and version pair.
- type: input
id: integration
attributes:
label: Integration
validations:
required: true
- type: input
id: documentdb_version
attributes:
label: DocumentDB version
validations:
required: true
- type: input
id: upstream_version
attributes:
label: Integration version
validations:
required: true
- type: textarea
id: environment
attributes:
label: Actual environment
description: Include operating system, runtime, topology, and relevant non-secret settings.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Reproduction and expected versus actual behavior
validations:
required: true
- type: textarea
id: dashboard_run
attributes:
label: Dashboard and pipeline run
description: Include the dashboard entry or run that led you to expect this scenario to work.
validations:
required: true
12 changes: 12 additions & 0 deletions .github/workflows/compatibility-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ on:
- "compatibility/**"
- ".github/workflows/compatibility*"
- ".github/aw/actions-lock.json"
- ".github/ISSUE_TEMPLATE/compatibility-report.yml"
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
paths:
- "compatibility/**"
- ".github/workflows/compatibility*"
- ".github/aw/actions-lock.json"
- ".github/ISSUE_TEMPLATE/compatibility-report.yml"

concurrency:
group: compatibility-infrastructure-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -43,5 +45,15 @@ jobs:
python -m mypy --config-file compatibility/pyproject.toml compatibility
- name: Run compatibility unit tests
run: python -m pytest -c compatibility/pyproject.toml compatibility/unit
- name: Check the trusted Git history publisher
run: shellcheck compatibility/persist.sh
- name: Check the README dashboard publisher
run: shellcheck compatibility/publish-readme.sh
- name: Check dashboard freshness
run: |
image=node:24.21.0-bookworm-slim@sha256:5cbc7caba8c2c0f0bca675d1b61b9f2857e1cf1853c6164ee9dd409501a936e7
docker run --rm --read-only --network none --user 1000:1000 \
--tmpfs /tmp:size=64m --cap-drop=ALL --security-opt=no-new-privileges \
--mount "type=bind,source=$PWD,target=/workspace,readonly" \
--workdir /workspace "$image" \
node --test compatibility/unit/test_freshness.cjs
46 changes: 46 additions & 0 deletions .github/workflows/compatibility-documentdb-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Compatibility DocumentDB releases

on:
push:
branches: [main]
paths:
- compatibility/registry.yaml

permissions:
contents: read

jobs:
dispatch:
name: Test added or re-pinned DocumentDB releases
runs-on: ubuntu-24.04
timeout-minutes: 5
permissions:
actions: write
contents: read
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Install trusted orchestration dependencies
run: python -m pip install -r compatibility/requirements.txt
- name: Dispatch the compatibility workflow for each changed release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
BEFORE: ${{ github.event.before }}
run: |
previous="$RUNNER_TEMP/previous-registry.yaml"
if ! git show "$BEFORE:compatibility/registry.yaml" > "$previous"; then
echo "The previous registry is unavailable, so every reviewed release is dispatched."
: > "$previous"
fi
releases=$(python -m compatibility.workflow changed-releases --previous "$previous")
for release in $releases; do
printf 'Dispatching compatibility runs for DocumentDB %s\n' "$release"
gh workflow run compatibility.yml --ref "$GITHUB_REF_NAME" \
-f integration=all -f documentdb_version="$release" -f trigger=documentdb_release
done
156 changes: 156 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
name: Ecosystem compatibility

on:
workflow_dispatch:
inputs:
integration:
description: Integration, or all enabled registry entries
type: choice
options:
- all
- pymongo
default: all
required: true
version:
description: Upstream version override (single integration only; blank uses registry defaults)
type: string
required: false
documentdb_version:
description: Reviewed DocumentDB release from compatibility/registry.yaml, or all (blank uses the newest)
type: string
required: false
trigger:
description: Execution trigger recorded with the results
type: choice
options:
- manual
- documentdb_release
default: manual
required: true
schedule:
- cron: "41 5 * * *"

permissions:
contents: read

jobs:
plan:
name: Select integrations
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
matrix: ${{ steps.select.outputs.matrix }}
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Install trusted orchestration dependencies
run: python -m pip install -r compatibility/requirements.txt
- name: Resolve the reviewed integration matrix
id: select
env:
INTEGRATION: ${{ inputs.integration }}
VERSION: ${{ inputs.version }}
DOCUMENTDB_VERSION: ${{ github.event_name == 'schedule' && 'all' || inputs.documentdb_version }}
TRIGGER: ${{ github.event_name == 'schedule' && 'scheduled' || inputs.trigger }}
run: |
args=()
if [ -n "$INTEGRATION" ]; then args+=(--integration "$INTEGRATION"); fi
if [ -n "$DOCUMENTDB_VERSION" ]; then args+=(--documentdb-version "$DOCUMENTDB_VERSION"); fi
if [ -n "$VERSION" ]; then args+=(--version "$VERSION"); fi
if [ -n "$TRIGGER" ]; then args+=(--trigger "$TRIGGER"); fi
matrix=$(python -m compatibility.workflow matrix "${args[@]}")
printf 'matrix=%s\n' "$matrix" >> "$GITHUB_OUTPUT"
test:
name: ${{ matrix.integration }} ${{ matrix.version }} on DocumentDB ${{ matrix.documentdb_version }}
needs: plan
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.plan.outputs.matrix) }}
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Install trusted orchestration dependencies
run: python -m pip install -r compatibility/requirements.txt
- name: Run the isolated integration profile
id: suite
env:
INTEGRATION: ${{ matrix.integration }}
VERSION: ${{ matrix.version }}
DOCUMENTDB_VERSION: ${{ matrix.documentdb_version }}
TRIGGER: ${{ matrix.trigger }}
run: |
args=(
--integration "$INTEGRATION"
--version "$VERSION"
--documentdb-version "$DOCUMENTDB_VERSION"
--output "results/$INTEGRATION/$DOCUMENTDB_VERSION/result.json"
--run-url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/attempts/$GITHUB_RUN_ATTEMPT"
--trigger "$TRIGGER"
)
python -m compatibility.runner "${args[@]}"
- name: Retain integration results and sanitized diagnostics
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: compatibility-results-${{ matrix.integration }}-${{ matrix.documentdb_version }}-${{ github.run_attempt }}
path: results/
if-no-files-found: error
retention-days: 30
report:
name: Combined compatibility report
needs: [plan, test]
if: always() && needs.plan.result == 'success'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
with:
persist-credentials: false
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: "3.12"
- name: Install trusted reporting dependencies
run: python -m pip install -r compatibility/requirements.txt
- name: Collect this attempt's integration artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
pattern: compatibility-results-*-${{ github.run_attempt }}
path: incoming
merge-multiple: true
- name: Render combined results, including missing or failed integrations
if: always()
env:
INTEGRATION: ${{ inputs.integration }}
VERSION: ${{ inputs.version }}
DOCUMENTDB_VERSION: ${{ github.event_name == 'schedule' && 'all' || inputs.documentdb_version }}
TRIGGER: ${{ github.event_name == 'schedule' && 'scheduled' || inputs.trigger }}
run: |
args=(
--input incoming
--output report
--summary "$GITHUB_STEP_SUMMARY"
--expected-run-url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/attempts/$GITHUB_RUN_ATTEMPT"
)
if [ -n "$INTEGRATION" ]; then args+=(--integration "$INTEGRATION"); fi
if [ -n "$DOCUMENTDB_VERSION" ]; then args+=(--documentdb-version "$DOCUMENTDB_VERSION"); fi
if [ -n "$VERSION" ]; then args+=(--version "$VERSION"); fi
if [ -n "$TRIGGER" ]; then args+=(--trigger "$TRIGGER"); fi
python -m compatibility.workflow report "${args[@]}"
- name: Retain the combined summary and dashboard
if: always()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
with:
name: compatibility-report-${{ github.run_attempt }}
path: report/
if-no-files-found: error
retention-days: 30
Loading