build(ci): drop molecule's Docker driver and community.docker from the ci image
Molecule runs in the molecule-controller image. In the ci image, only Lint's "Test the repository scripts" step uses molecule: test_check_scenarios_load_checkout.py runs check_scenarios_load_checkout.py, which imports molecule's config lookup, and test_run_molecule_scenarios.py expands platform names with molecule's interpolator. Both skip silently without molecule, so molecule stays, with a comment naming the step. Nothing in Lint or Build uses the Docker driver (molecule-plugins[docker]) or the docker SDK it pulls in: those tests use molecule's default driver and a stub docker module. No linted file calls a community.docker module, and a local clone, which never installs extensions/molecule/requirements.yml, passes ansible-lint. So the driver, docker, selinux and community.docker leave the ci image, and extensions/molecule/requirements.yml leaves its pin record: a community.docker bump no longer publishes a ci version. The lock is regenerated with scripts/lock-requirements.sh. Every script test passes, none skipped, in a venv installed from the new lock. Assisted-by: Claude Code
This commit is contained in:
1 parent
3414880d05
commit
39ec8e5b3c
9 files changed
+33
-58
No files matched your search
@@ -53,8 +53,7 @@ issue.
|
||||
|
||||
- **Lint and Build run in the pinned `ci` image and compare the pin files with the checksums
|
||||
baked into it (`/opt/ci-pins.sha256`).** A pull request that changes `requirements-dev.txt`,
|
||||
`requirements-dev.lock`, `requirements.yml`, `extensions/molecule/requirements.yml` or
|
||||
`.pre-commit-config.yaml` takes the slow path, which installs the pinned tools and collections.
|
||||
`requirements-dev.lock`, `requirements.yml` or `.pre-commit-config.yaml` takes the slow path, which installs the pinned tools and collections.
|
||||
*Why:* a pull request is tested on its own pins, and an unchanged one starts in seconds.
|
||||
*Held:* control: the "Check the baked tooling against the pins" step.
|
||||
- **On the fast path the network is cut by environment**: `PIP_NO_INDEX=1`, the proxy variables
|
||||
|
||||
@@ -66,8 +66,8 @@ jobs:
|
||||
HTTP_PROXY=http://127.0.0.1:9 HTTPS_PROXY=http://127.0.0.1:9 no_proxy= NO_PROXY= >> "$GITHUB_ENV"
|
||||
echo "::notice::Later steps run with a dead proxy; a download fails the job (bake it into images/ci)."
|
||||
else
|
||||
echo "::warning::requirements-dev.txt, requirements-dev.lock, requirements.yml," \
|
||||
"extensions/molecule/requirements.yml or .pre-commit-config.yaml differ from the ci image;" \
|
||||
echo "::warning::requirements-dev.txt, requirements-dev.lock, requirements.yml" \
|
||||
"or .pre-commit-config.yaml differ from the ci image;" \
|
||||
"installing the pinned tools for this run."
|
||||
/opt/venv/bin/pip install --quiet --require-hashes -r requirements-dev.lock -r requirements-dev.txt
|
||||
fi
|
||||
|
||||
@@ -6,8 +6,7 @@ name: Lint
|
||||
# The tools come from the ci image (images/ci, built by image.yml): the pinned Python
|
||||
# tools of requirements-dev.txt, the collections of requirements.yml and the hook
|
||||
# environments of .pre-commit-config.yaml are baked in. When a PR changes one of those
|
||||
# files or extensions/molecule/requirements.yml the checksum check below fails and the
|
||||
# job installs the pinned tools and collections itself for this run (slower, same result).
|
||||
# files the checksum check below fails and the job installs the pinned tools and collections itself for this run (slower, same result).
|
||||
on: # yamllint disable-line rule:truthy
|
||||
pull_request:
|
||||
branches:
|
||||
@@ -65,8 +64,8 @@ jobs:
|
||||
HTTP_PROXY=http://127.0.0.1:9 HTTPS_PROXY=http://127.0.0.1:9 no_proxy= NO_PROXY= >> "$GITHUB_ENV"
|
||||
echo "::notice::Later steps run with a dead proxy; a download fails the job (bake it into images/ci)."
|
||||
else
|
||||
echo "::warning::requirements-dev.txt, requirements-dev.lock, requirements.yml," \
|
||||
"extensions/molecule/requirements.yml or .pre-commit-config.yaml differ from the ci image;" \
|
||||
echo "::warning::requirements-dev.txt, requirements-dev.lock, requirements.yml" \
|
||||
"or .pre-commit-config.yaml differ from the ci image;" \
|
||||
"installing the pinned tools and collections for this run."
|
||||
/opt/venv/bin/pip install --quiet --require-hashes -r requirements-dev.lock -r requirements-dev.txt
|
||||
# --force: the baked copy of a changed pin is replaced, not kept as "already installed".
|
||||
|
||||
Reference in new issue
Block a user