Repository navigation
docs(openspec): plan #2603 Type docker-py with types-docker - #3071
Conversation
…eep refusals The plan named a test path that does not exist, set the ceiling to a value that the count does not give, and added a docker.io rule that breaks the existing refusal tests. It also asked to align Protocols that cannot match the stubs. The plan now uses the real paths and the measured count of 40. It casts the SDK client, declares requests, and keeps the refusals of tagged_image. It drops the spec delta.
|
Plan fix for #2603. No evaluation entry existed for this pull request, so I evaluated the plan myself against origin/main. Premise check: the premise holds. The 9 docker-py ignore markers exist. mypy with types-docker reports 12 errors: 9 unused ignores and 3 real errors. What the new commit changes (plan files only):
Confirmed findings: all defects above were reproduced with mypy and with path checks against origin/main, then fixed. Unconfirmed findings: none (no earlier evaluation entry). Verification: openspec validate --strict, devops openspec check and tests/invariants/test_change_folders.py (17 passed) all pass. I built the corrected change in a scratch copy. mypy, deps, lockfile, docs, lint and the touched tests passed there. I then reverted that copy. I merged origin/main into the branch before the push. No code, test or other change folder was touched. |
|
Advisory pre-merge review (automated; a person decides). Recommendation: hold. The plan files are sound, but the PR body states facts that the files contradict. The body becomes the squash commit message, so a person should fix the body first.
What is good:
Checks that were run:
|
Plans #2610 This change replaces the `docker buildx imagetools inspect` subprocess call in `devops k8s image-pins` with the project's own `tag_digest` function, which sends a HEAD request of the manifest. Docker Hub does not count HEAD requests against the anonymous pull allowance. Fourteen of the 32 pins under `k8s/` are on Docker Hub, so each run no longer spends 14 pulls from the shared allowance. The change removes `inspect_command`, `ImagetoolsFake`, its contract suite and its recordings. It moves `image_reference` to `src/devops_cli/docker/registry.py`. Tests now double the registry at the HTTP edge with `RegistryFake`, served by `stub_web`. No new tool pin is needed. The open plan for #2603 (pull request #3071) edits `tagged_image` and `tests/docker/test_registry_tag_digest.py` too, and it keeps the refusal of Docker Hub names. This plan removes that refusal. The pull request that merges later must update the other plan or the code of the earlier one. Change: `openspec/changes/2610-devops-k8s-image-pins-resolves-with/` --------- Co-authored-by: devops-cli-service[bot] <349441588+devops-cli-service[bot]@users.noreply.github.com> Co-authored-by: Daniel Petty <[email protected]>
Plans #2603
Plan: type docker-py with typeshed's types-docker. Add
types-docker==7.2.0.20261006to the dev group andrequests==2.34.2to the dependencies (already in the lockfile through docker-py;engine.pyimportsrequests.HTTPError). Fix the 3 mypy errors that the stubs show inengine.py: catchrequests.HTTPError, importget_current_context_namefromdocker.context.config, and return the client of_sdk_clientthroughcast("EngineClient", ...). Delete the 9 now-unused# type: ignore[import-untyped]markers inengine.py,sandbox/host.pyandcommands/docker.py, and lower thesrc type: ignoreceiling from 51 to 40.tagged_imageinregistry.pyuses docker-py'sparse_repository_tagandresolve_repository_name, imported lazily. It keeps its refusals: a reference with no registry host, or one that docker-py rejects, is still aRegistryReadError. A reference with a digest now splits into the repository and the digest. The change has no spec delta.Change:
openspec/changes/2603-type-docker-py-with-typeshed-s/