• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 21552830208

31 Jan 2026 11:40PM UTC coverage: 80.277% (-0.05%) from 80.324%
21552830208

Pull #23062

github

web-flow
Merge 808a9786c into 2c4dcf9cf
Pull Request #23062: Remove support for Get

18 of 25 new or added lines in 4 files covered. (72.0%)

17119 existing lines in 541 files now uncovered.

78278 of 97510 relevant lines covered (80.28%)

3.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.96
/src/python/pants/backend/docker/goals/tailor.py
1
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
1✔
5

UNCOV
6
import os
1✔
UNCOV
7
from dataclasses import dataclass
1✔
8

UNCOV
9
from pants.backend.docker.subsystems.docker_options import DockerOptions
1✔
UNCOV
10
from pants.backend.docker.target_types import DockerImageSourceField, DockerImageTarget
1✔
UNCOV
11
from pants.core.goals.tailor import (
1✔
12
    AllOwnedSources,
13
    PutativeTarget,
14
    PutativeTargets,
15
    PutativeTargetsRequest,
16
)
UNCOV
17
from pants.engine.intrinsics import path_globs_to_paths
1✔
UNCOV
18
from pants.engine.rules import collect_rules, rule
1✔
UNCOV
19
from pants.engine.unions import UnionRule
1✔
UNCOV
20
from pants.util.logging import LogLevel
1✔
21

22

UNCOV
23
@dataclass(frozen=True)
1✔
UNCOV
24
class PutativeDockerTargetsRequest(PutativeTargetsRequest):
1✔
UNCOV
25
    pass
1✔
26

27

UNCOV
28
@rule(level=LogLevel.DEBUG, desc="Determine candidate Docker targets to create")
1✔
UNCOV
29
async def find_putative_targets(
1✔
30
    req: PutativeDockerTargetsRequest, all_owned_sources: AllOwnedSources, docker: DockerOptions
31
) -> PutativeTargets:
32
    if not docker.tailor:
×
33
        return PutativeTargets()
×
34

35
    all_dockerfiles = await path_globs_to_paths(req.path_globs("*Dockerfile*"))
×
36
    unowned_dockerfiles = set(all_dockerfiles.files) - set(all_owned_sources)
×
37
    pts = []
×
38
    for dockerfile in sorted(unowned_dockerfiles):
×
39
        dirname, filename = os.path.split(dockerfile)
×
40
        kwargs = {} if filename == DockerImageSourceField.default else {"source": filename}
×
41
        pts.append(
×
42
            PutativeTarget.for_target_type(
43
                DockerImageTarget,
44
                path=dirname,
45
                name="docker",
46
                triggering_sources=[filename],
47
                kwargs=kwargs,
48
            )
49
        )
50
    return PutativeTargets(pts)
×
51

52

UNCOV
53
def rules():
1✔
UNCOV
54
    return [
1✔
55
        *collect_rules(),
56
        UnionRule(PutativeTargetsRequest, PutativeDockerTargetsRequest),
57
    ]
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc