Skip to content

Commit 7c52ed0

Browse files
chore: Add check for platform versions (#4584)
This pull request introduces several updates to platform compatibility management and dependency constraints, as well as minor configuration changes. The most significant changes are the addition of explicit package version rules for Renovate, updates to dependency versions, and the inclusion of a new pre-commit hook for platform constraint checking. **Platform compatibility and dependency management:** * Added explicit `packageRules` in `renovate.json` to restrict versions of key dependencies (e.g., `ansible-core`, `cffi`, `django`, `importlib-metadata`, `jsonschema`, `packaging`, `pyyaml`, `python-gnupg`, `setuptools`) for platform compatibility. * Updated the `packaging` dependency version in `pyproject.toml` to require at least `23.2` instead of `25.0`, aligning with the new Renovate constraint. **Pre-commit and configuration updates:** * Added a new pre-commit hook `check-platform-constraints` from `ansible/team-devtools` to enforce platform compatibility during development. **Minor dictionary and housekeeping updates:** * Removed the word `levelname` from `.config/dictionary.txt` to clean up the custom dictionary. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 925e0f3 commit 7c52ed0

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,7 @@ repos:
143143
hooks:
144144
- id: ansible-lint
145145
stages: [manual]
146+
- repo: https://github.com/ansible/team-devtools
147+
rev: v25.12.8
148+
hooks:
149+
- id: check-platform-constraints

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ dependencies = [
3838
"enrich>=1.2.7",
3939
"jinja2>=2.11.3",
4040
"jsonschema>=4.9.1",
41-
"packaging>=25.0",
41+
"packaging>=23.2",
4242
"pluggy>=0.7.1,<2.0",
4343
"pyyaml>=5.1",
4444
"rich>=9.5.1",

renovate.json

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>ansible/actions//config/renovate.json"]
3+
"extends": ["github>ansible/actions//config/renovate.json"],
4+
"packageRules": [
5+
{
6+
"allowedVersions": "<2.17",
7+
"description": "Platform compatibility constraint",
8+
"matchPackageNames": ["ansible-core"]
9+
},
10+
{
11+
"allowedVersions": "<1.16",
12+
"description": "Platform compatibility constraint",
13+
"matchPackageNames": ["cffi"]
14+
},
15+
{
16+
"allowedVersions": "<4.3",
17+
"description": "Platform compatibility constraint",
18+
"matchPackageNames": ["django"]
19+
},
20+
{
21+
"allowedVersions": "<6.1",
22+
"description": "Platform compatibility constraint",
23+
"matchPackageNames": ["importlib-metadata"]
24+
},
25+
{
26+
"allowedVersions": "<4.22",
27+
"description": "Platform compatibility constraint",
28+
"matchPackageNames": ["jsonschema"]
29+
},
30+
{
31+
"allowedVersions": "<25.0",
32+
"description": "Platform compatibility constraint",
33+
"matchPackageNames": ["packaging"]
34+
},
35+
{
36+
"allowedVersions": "<6.0.2",
37+
"description": "Platform compatibility constraint",
38+
"matchPackageNames": ["pyyaml"]
39+
},
40+
{
41+
"allowedVersions": "<0.5.3",
42+
"description": "Platform compatibility constraint",
43+
"matchPackageNames": ["python-gnupg"]
44+
},
45+
{
46+
"allowedVersions": "<65.6",
47+
"description": "Platform compatibility constraint",
48+
"matchPackageNames": ["setuptools"]
49+
}
50+
]
451
}

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)