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

pantsbuild / pants / 19015773527

02 Nov 2025 05:33PM UTC coverage: 17.872% (-62.4%) from 80.3%
19015773527

Pull #22816

github

web-flow
Merge a12d75757 into 6c024e162
Pull Request #22816: Update Pants internal Python to 3.14

4 of 5 new or added lines in 3 files covered. (80.0%)

28452 existing lines in 683 files now uncovered.

9831 of 55007 relevant lines covered (17.87%)

0.18 hits per line

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

0.0
/src/python/pants/backend/helm/check/kubeconform/deployment.py
1
# Copyright 2023 Pants project contributors (see CONTRIBUTORS.md).
2
# Licensed under the Apache License, Version 2.0 (see LICENSE).
3

UNCOV
4
from __future__ import annotations
×
5

UNCOV
6
import logging
×
UNCOV
7
from dataclasses import dataclass
×
8

UNCOV
9
from pants.backend.helm.check.kubeconform import common, extra_fields
×
UNCOV
10
from pants.backend.helm.check.kubeconform.common import (
×
11
    KubeconformCheckRequest,
12
    RunKubeconformRequest,
13
    run_kubeconform,
14
)
UNCOV
15
from pants.backend.helm.check.kubeconform.extra_fields import KubeconformFieldSet
×
UNCOV
16
from pants.backend.helm.check.kubeconform.subsystem import KubeconformSubsystem
×
UNCOV
17
from pants.backend.helm.dependency_inference import deployment as infer_deployment
×
UNCOV
18
from pants.backend.helm.subsystems.post_renderer import setup_post_renderer_launcher
×
UNCOV
19
from pants.backend.helm.target_types import HelmDeploymentFieldSet
×
UNCOV
20
from pants.backend.helm.util_rules import post_renderer, renderer
×
UNCOV
21
from pants.backend.helm.util_rules.post_renderer import HelmDeploymentPostRendererRequest
×
UNCOV
22
from pants.backend.helm.util_rules.renderer import (
×
23
    HelmDeploymentCmd,
24
    HelmDeploymentRequest,
25
    run_renderer,
26
)
UNCOV
27
from pants.core.goals.check import CheckRequest, CheckResult, CheckResults
×
UNCOV
28
from pants.engine.rules import collect_rules, concurrently, implicitly, rule
×
UNCOV
29
from pants.engine.unions import UnionRule
×
30

UNCOV
31
logger = logging.getLogger(__name__)
×
32

33

UNCOV
34
@dataclass(frozen=True)
×
UNCOV
35
class KubeconformDeploymentFieldSet(HelmDeploymentFieldSet, KubeconformFieldSet):
×
UNCOV
36
    pass
×
37

38

UNCOV
39
class KubeconformCheckDeploymentRequest(KubeconformCheckRequest):
×
UNCOV
40
    field_set_type = KubeconformDeploymentFieldSet
×
41

42

UNCOV
43
@rule
×
UNCOV
44
async def run_kubeconform_on_deployment(
×
45
    field_set: KubeconformDeploymentFieldSet,
46
) -> CheckResult:
47
    if field_set.skip.value:
×
48
        return CheckResult(
×
49
            exit_code=0, stdout="", stderr="", partition_description=field_set.address.spec
50
        )
51

52
    post_renderer = await setup_post_renderer_launcher(
×
53
        **implicitly(HelmDeploymentPostRendererRequest(field_set))
54
    )
55
    rendered_files = await run_renderer(
×
56
        **implicitly(
57
            HelmDeploymentRequest(
58
                field_set,
59
                cmd=HelmDeploymentCmd.RENDER,
60
                post_renderer=post_renderer,
61
                description=f"Evaluating Helm deployment files for {field_set.address}",
62
            )
63
        )
64
    )
65

66
    return await run_kubeconform(RunKubeconformRequest(field_set, rendered_files), **implicitly())
×
67

68

UNCOV
69
@rule
×
UNCOV
70
async def run_check_deployment(
×
71
    request: KubeconformCheckDeploymentRequest,
72
    kubeconform: KubeconformSubsystem,
73
) -> CheckResults:
74
    check_results = await concurrently(
×
75
        run_kubeconform_on_deployment(field_set) for field_set in request.field_sets
76
    )
77
    return CheckResults(check_results, checker_name=kubeconform.name)
×
78

79

UNCOV
80
def rules():
×
UNCOV
81
    return [
×
82
        *collect_rules(),
83
        *extra_fields.rules(),
84
        *infer_deployment.rules(),
85
        *post_renderer.rules(),
86
        *renderer.rules(),
87
        *common.rules(),
88
        UnionRule(CheckRequest, KubeconformCheckDeploymentRequest),
89
    ]
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