Skip to content

Commit fad2d09

Browse files
committed
Constraint python dependencies to ensure reproducible test results
1 parent 7b7bf7d commit fad2d09

File tree

11 files changed

+177
-24
lines changed

11 files changed

+177
-24
lines changed

.config/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/ansible/community-ansible-dev-tools:latest AS DEFAULT_EE
1+
FROM ghcr.io/ansible/community-ansible-dev-tools:v25.2.1 AS DEFAULT_EE
22
# This file is updated by dependabot and used to determine not only which
33
# version of community-ansible-dev-tools we are supposed to use for testing execution
44
# environments but also to dynamically retrieve the same set of constraints

.config/constraints.txt

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# This file was autogenerated by uv via the following command:
2+
# task -e deps
3+
ansible-builder==3.1.0
4+
ansible-compat==25.1.5
5+
ansible-lint==25.1.3
6+
ansible-navigator==25.4.0
7+
ansible-runner==2.4.1
8+
argparse-manpage==4.6
9+
attrs==25.3.0
10+
babel==2.17.0
11+
backrefs==5.8
12+
beautifulsoup4==4.13.4
13+
bindep==2.13.0
14+
black==25.1.0
15+
bracex==2.5.post1
16+
cairocffi==1.7.1
17+
cairosvg==2.7.1
18+
certifi==2025.1.31
19+
cffi==1.17.1
20+
cfgv==3.4.0
21+
charset-normalizer==3.4.1
22+
click==8.1.8
23+
colorama==0.4.6
24+
cryptography==44.0.2
25+
csscompressor==0.9.5
26+
cssselect2==0.8.0
27+
cython==3.0.12
28+
dacite==1.9.2
29+
defusedxml==0.7.1
30+
distlib==0.3.9
31+
distro==1.9.0
32+
dnspython==2.7.0
33+
filelock==3.18.0
34+
ghp-import==2.1.0
35+
gitdb==4.0.12
36+
gitpython==3.1.44
37+
griffe==1.7.2
38+
hjson==3.1.0
39+
htmlmin2==0.1.13
40+
identify==2.6.9
41+
idna==3.10
42+
importlib-metadata==8.6.1
43+
jinja2==3.1.6
44+
jsmin==3.0.1
45+
jsonschema==4.23.0
46+
jsonschema-specifications==2024.10.1
47+
linkchecker==10.5.0
48+
lockfile==0.12.2
49+
markdown==3.8
50+
markdown-exec==1.10.3
51+
markdown-include==0.8.1
52+
markupsafe==3.0.2
53+
mergedeep==1.3.4
54+
mkdocs==1.6.1
55+
mkdocs-ansible==25.2.0
56+
mkdocs-autorefs==1.4.1
57+
mkdocs-exclude==1.0.2
58+
mkdocs-gen-files==0.5.0
59+
mkdocs-get-deps==0.2.0
60+
mkdocs-git-revision-date-localized-plugin==1.4.5
61+
mkdocs-htmlproofer-plugin==1.3.0
62+
mkdocs-macros-plugin==1.3.7
63+
mkdocs-material==9.6.12
64+
mkdocs-material-extensions==1.3.1
65+
mkdocs-minify-plugin==0.8.0
66+
mkdocs-monorepo-plugin==1.1.0
67+
mkdocs-multirepo-plugin==0.8.3
68+
mkdocstrings==0.29.1
69+
mkdocstrings-python==1.16.10
70+
mypy==1.15.0
71+
mypy-extensions==1.0.0
72+
nodeenv==1.9.1
73+
onigurumacffi==1.4.1
74+
packaging==24.2
75+
paginate==0.5.7
76+
parsley==1.3
77+
pathspec==0.12.1
78+
pbr==6.1.1
79+
pexpect==4.9.0
80+
pillow==11.2.1
81+
platformdirs==4.3.7
82+
pre-commit==4.2.0
83+
pre-commit-uv==4.1.4
84+
ptyprocess==0.7.0
85+
pycparser==2.22
86+
pygments==2.19.1
87+
pymdown-extensions==10.14.3
88+
python-daemon==3.1.2
89+
python-dateutil==2.9.0.post0
90+
python-slugify==8.0.4
91+
pytz==2025.2
92+
pyyaml==6.0.2
93+
pyyaml-env-tag==0.1
94+
referencing==0.36.2
95+
requests==2.32.3
96+
rpds-py==0.24.0
97+
ruamel-yaml==0.18.10
98+
six==1.17.0
99+
slugify==0.0.1
100+
smmap==5.0.2
101+
soupsieve==2.6
102+
subprocess-tee==0.4.2
103+
super-collections==0.5.3
104+
termcolor==3.0.1
105+
text-unidecode==1.3
106+
tinycss2==1.4.0
107+
typing-inspect==0.8.0
108+
tzdata==2025.2
109+
urllib3==2.4.0
110+
virtualenv==20.30.0
111+
watchdog==6.0.0
112+
wcmatch==10.0
113+
webencodings==0.5.1
114+
yamllint==1.37.0
115+
zipp==3.21.0
116+
117+
# The following packages were excluded from the output:
118+
# ansible-core
119+
# pip
120+
# resolvelib
121+
# typing-extensions
122+
# setuptools
123+
# uv

.config/requirements.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ansible-lint>=6.8.7
44
ansible-navigator
55
mypy # used by vscode
66
pip>=22.3.1
7-
pip-tools>=6.12.1
87
pre-commit>=4.0.1
98
pre-commit-uv>=4.1.4
109
# docs

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
version: 2
22
updates:
3+
- package-ecosystem: pip
4+
directory: /.config/
5+
schedule:
6+
day: sunday
7+
interval: weekly
8+
labels:
9+
- dependabot-deps-updates
10+
- skip-changelog
11+
groups:
12+
dependencies:
13+
patterns:
14+
- "*"
315
- package-ecosystem: npm
416
directories:
517
- "/"

.github/workflows/ci.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,25 @@ jobs:
149149

150150
- name: Setup node.js
151151
if: ${{ !contains(matrix.shell, 'wsl') }}
152-
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
152+
uses: actions/setup-node@v4.4.0
153153
with:
154154
node-version: 20
155-
cache: yarn
155+
# yarn cache is broken due https://github.com/actions/setup-node/issues/531
156+
# cache: yarn
157+
158+
- name: Corepack enable
159+
if: ${{ !contains(matrix.shell, 'wsl') }}
160+
run: corepack enable
161+
162+
- name: Cache .yarn/cache
163+
uses: actions/cache@v4
164+
env:
165+
cache-name: yarn-cache
166+
with:
167+
path: ~/.yarn/cache
168+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
169+
restore-keys: |
170+
${{ runner.os }}-${{ env.cache-name }}
156171
157172
- name: Setup task
158173
if: ${{ !contains(matrix.shell, 'wsl') }}

Taskfile.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ tasks:
8484
VSCODE_VERSION:
8585
sh: node -p "require('./package.json').engines.vscode"
8686
cmds:
87+
- uv pip compile -q --universal --no-annotate --output-file .config/constraints.txt .config/requirements.in
8788
- task: install
8889
# upgrade yarn itself
8990
- yarn set version latest

cspell.config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ dictionaries:
1313
- "!cryptocurrencies"
1414
- "!cpp"
1515
ignorePaths:
16-
- syntaxes/external/*.*
16+
- "**/requirements.in"
17+
- .config/constraints.txt
18+
- .yarn/
1719
- media
1820
- package.json
19-
- test/testFixtures/lightspeed/*.yml
20-
- .yarn/
21-
- "**/requirements.in"
2221
- syntaxes
22+
- syntaxes/external/*.*
23+
- test/testFixtures/lightspeed/*.yml
2324
ignoreRegExpList:
2425
# ignore github usernames like @foo
2526
- "@[\\w]+"

packages/ansible-language-server/.config/requirements.in

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/ansible-language-server/test/providers/validationProvider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function testAnsibleLintErrors(
9292
severity: 1,
9393
message: "Variables names",
9494
range: {
95-
start: { line: 4, character: 0 } as Position,
95+
start: { line: 4, character: 4 } as Position,
9696
end: {
9797
line: 4,
9898
character: integer.MAX_VALUE,

pyproject.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,19 @@ exclude = ["examples"]
3535
fix = true
3636
line-length = 100
3737
target-version = "py310"
38+
39+
[tool.uv.pip]
40+
no-emit-package = [
41+
"ansible-core",
42+
"exceptiongroup", # <py311
43+
"pip",
44+
"resolvelib",
45+
"ruamel-yaml-clib",
46+
"tomli", # <py311
47+
"typing-extensions",
48+
"setuptools",
49+
"wheel",
50+
"uv"
51+
]
52+
annotation-style = "line"
53+
custom-compile-command = "task -e deps"

0 commit comments

Comments
 (0)