Skip to content

refactor(cli): callers use the HTTP entry point, old factories go #3758

Closed
3 of 3 issues completed
Closed

Description

@dan-petty

Problem

Part 3 of #1314, which is too large for one pull request (comment of 2026-11-05).

After parts 1 and 2, 36 modules outside http/ still name the four factory functions, at about 180 sites. 21 test files name them. 93 test files use stub_web, public_dns or scripted_resolver. The deletion of a name cannot be partial, because a part that keeps a name needs a shim.

Expected

Every caller builds its client through the one entry point of part 2, and every test uses the web and dns fixtures. The old names and fakes are gone.

Acceptance criteria

  • The callers move by package, one pull request for each group, in 4 to 6 pull requests: ai; k8s and argo; security and telemetry; commands and the rest. Each pull request moves its callers to the entry point, and its tests from stub_web, public_dns and scripted_resolver to the web and dns fixtures. Each caller keeps its timeouts, limits, redirect rules and SSRF validation.
  • The last pull request deletes new_http_client, new_async_http_client, get_shared_client, get_shared_async_client, stub_web, public_dns, ScriptedResolver and tests/web_fakes.py. No source file names the deleted functions.
  • The tests of the moved packages patch no devops_cli name, no httpx2 class and not socket.getaddrinfo.
  • The inline httpx2 builders and the direct socket.getaddrinfo callers of each package move to the entry point and the resolver seam, with the package.
  • Each pull request runs uv run devops ci green.

Existing tool considered

Alternatives check of #1314 (2026-10-29): not-applicable. This part uses the seams of parts 1 and 2 and adds no tool.

Related

Parent: #1314. Blocked by part 2 (the entry point and the web fixture) and by part 1 (the dns fixture). The test migration items #1317, #1321, #1331, #1333, #1334 and #1335 own the tests of their packages; this part moves their stub_web and DNS users onto the new fixtures. Refine splits this issue into one issue for each package group when part 2 merges.

Sub-issues

Sub-issues

3 of 3 Issues completed
Loading 3 sub-issues

Activity

  1. added
    source/agent
    type/refactor
    scope/cli
    status/new
    value/medium
    effort/high
    on Nov 6, 2026
  2. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/refactor. The refactor prefix of the title gives the type.
    • Scope: scope/cli. The (cli) scope of the title gives the scope.
    • Priority: P2-Medium. A large planned refactoring with no user-facing defect, blocked on parts 1 and 2.
    • Value: Medium. Removes 180 call sites and 93 test files of duplication but adds no new user capability.
    • Effort: High. Spans 4 to 6 pull requests across 36 modules and 114 test files.
    • Related: refactor(cli): Unify HTTP and DNS seams with shared fakes #1314, which asks for a different change. Both belong to the HTTP seam refactor; #1314 is the umbrella that contains this part, while the candidate is one sub-task that moves callers and deletes the old factories.
  3. added
    priority/p2-medium
    on Nov 6, 2026
  4. added
    status/in-progress
    and removed
    status/new
    on Nov 6, 2026
  5. added a commit that references this issue on Nov 6, 2026
    64e65c2
  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 6, 2026
  7. removed
    status/in-review
    on Nov 6, 2026
  8. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-06 19:47 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/highpriority/p2-mediumscope/clisource/agenttype/refactorvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions