Skip to content

Add auto-generated compatibility matrix docs#918

Merged
petercrocker merged 2 commits intostablefrom
pc/add-compatibility-matrix-docs
Apr 6, 2026
Merged

Add auto-generated compatibility matrix docs#918
petercrocker merged 2 commits intostablefrom
pc/add-compatibility-matrix-docs

Conversation

@petercrocker
Copy link
Copy Markdown
Contributor

@petercrocker petercrocker commented Apr 5, 2026

Summary by CodeRabbit

  • Documentation

    • Added a new "Compatibility matrix" reference page detailing Infrahub ↔ Python SDK version mappings, Python version support ranges, and feature-specific minimum versions
    • Added general guidance on selecting and upgrading SDK/Infrahub versions and included the page in the Python SDK reference sidebar
  • Chores

    • Added tooling to generate and refresh the compatibility matrix content automatically
  • Add a new reference page documenting SDK-to-Infrahub version compatibility
  • Version mapping covers Infrahub 1.3.x through 1.8.x with exact SDK version pins for every release
  • Includes Python version support matrix and feature-specific version requirements
  • Page is auto-generated from structured data via Jinja2 template, matching the existing config/templating docs pattern

Files

  • docs/docs_generation/compatibility.py — structured data (dataclasses) for all version mappings
  • docs/_templates/sdk_compatibility.j2 — Jinja2 template for rendering the MDX page
  • tasks.py — wired into generate_python_sdk() pipeline
  • docs/docs/python-sdk/reference/compatibility.mdx — generated output
  • Sidebar and introduction updated with links to the new page

Test plan

  • uv run invoke docs-generate succeeds and produces expected output
  • uv run invoke lint-docs passes (markdownlint + vale)
  • uv run invoke lint-code passes (ruff, ty, mypy)
  • Review generated page renders correctly in Docusaurus

Add a new reference page documenting SDK-to-Infrahub version compatibility.
The page is auto-generated from structured data in
docs/docs_generation/compatibility.py via a Jinja2 template, following the
same pattern as the existing config and templating reference pages.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2160eb02-26c9-4b5d-862a-47c7c2343df2

📥 Commits

Reviewing files that changed from the base of the PR and between d52077c and 14175cb.

📒 Files selected for processing (3)
  • docs/docs/python-sdk/reference/compatibility.mdx
  • docs/docs_generation/compatibility.py
  • docs/docs_generation/update_compatibility.py

Walkthrough

Added a new "Compatibility matrix" documentation workflow for the Python SDK. Introduces a Jinja2 template (docs/_templates/sdk_compatibility.j2), a generated MDX page (docs/docs/python-sdk/reference/compatibility.mdx), a static compatibility data module with typed dataclasses and populated lists (docs/docs_generation/compatibility.py), a script to rebuild that data from GitHub tags (docs/docs_generation/update_compatibility.py), an integration in the documentation task runner (tasks.py) to render the page, and a sidebar entry (docs/sidebars/sidebars-python-sdk.ts).

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and concisely summarizes the main change: adding auto-generated documentation for SDK-to-Infrahub version compatibility.
Description check ✅ Passed The pull request description addresses key template sections: Why (motivation for compatibility docs), What changed (files added, data structures, and integration), and How to test (with specific invoke commands and test results). Some optional sections like How to review and Impact & rollout are omitted, but the core information is complete and appropriate for the scope.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the type/documentation Improvements or additions to documentation label Apr 5, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 5, 2026

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: 14175cb
Status: ✅  Deploy successful!
Preview URL: https://952737bc.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pc-add-compatibility-matrix.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##           stable     #918      +/-   ##
==========================================
- Coverage   80.97%   80.68%   -0.29%     
==========================================
  Files         132      119      -13     
  Lines       11085    10336     -749     
  Branches     1700     1551     -149     
==========================================
- Hits         8976     8340     -636     
+ Misses       1555     1473      -82     
+ Partials      554      523      -31     
Flag Coverage Δ
integration-tests 41.72% <ø> (-1.08%) ⬇️
python-3.10 51.84% <ø> (-2.09%) ⬇️
python-3.11 51.84% <ø> (-2.11%) ⬇️
python-3.12 51.84% <ø> (-2.11%) ⬇️
python-3.13 51.82% <ø> (-2.13%) ⬇️
python-3.14 53.54% <ø> (-2.00%) ⬇️
python-filler-3.12 24.04% <ø> (+1.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 16 files with indirect coverage changes

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

@petercrocker
Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 5, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
docs/docs_generation/compatibility.py (1)

70-127: Minor observation: 1.7.x min_sdk could be 1.18.1 for precision.

Line 74 specifies min_sdk="1.18.0" for Infrahub 1.7.x, but all 1.7.x releases in RELEASE_MAPPINGS (lines 89-96) pin SDK 1.18.1. If 1.18.0 was never actually released with any 1.7.x Infrahub version, consider updating to 1.18.1 for accuracy.

This is a documentation precision matter rather than a functional issue—>= 1.18.0 technically includes 1.18.1.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/docs_generation/compatibility.py` around lines 70 - 127, Update the
VERSION_RANGES entry for VersionRange(infrahub="1.7.x") to min_sdk="1.18.1" to
match the pinned SDK in RELEASE_MAPPINGS for all 1.7.x releases; locate the
VersionRange with infrahub="1.7.x" in the VERSION_RANGES list and change its
min_sdk value from "1.18.0" to "1.18.1" for accuracy.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@docs/docs_generation/compatibility.py`:
- Around line 70-127: Update the VERSION_RANGES entry for
VersionRange(infrahub="1.7.x") to min_sdk="1.18.1" to match the pinned SDK in
RELEASE_MAPPINGS for all 1.7.x releases; locate the VersionRange with
infrahub="1.7.x" in the VERSION_RANGES list and change its min_sdk value from
"1.18.0" to "1.18.1" for accuracy.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6cb6ed95-a1c4-4cc2-b472-3163a2c42e2e

📥 Commits

Reviewing files that changed from the base of the PR and between 70202d4 and d52077c.

📒 Files selected for processing (6)
  • docs/_templates/sdk_compatibility.j2
  • docs/docs/python-sdk/introduction.mdx
  • docs/docs/python-sdk/reference/compatibility.mdx
  • docs/docs_generation/compatibility.py
  • docs/sidebars/sidebars-python-sdk.ts
  • tasks.py

Add update_compatibility.py to fetch version mappings from GitHub API
and rewrite compatibility.py automatically. Includes expanded data
from running the script (covers all releases back to 0.16.x).
Copy link
Copy Markdown
Contributor

@dgarros dgarros left a comment

Choose a reason for hiding this comment

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

Awesome

@petercrocker petercrocker marked this pull request as ready for review April 6, 2026 07:36
@petercrocker petercrocker merged commit 32d0db0 into stable Apr 6, 2026
20 of 21 checks passed
@petercrocker petercrocker deleted the pc/add-compatibility-matrix-docs branch April 6, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants