• 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

63.64
/src/python/pants/backend/helm/goals/lint.py
1
# Copyright 2022 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 logging
1✔
UNCOV
7
from dataclasses import dataclass
1✔
8

UNCOV
9
from pants.backend.helm.subsystems.helm import HelmSubsystem
1✔
UNCOV
10
from pants.backend.helm.target_types import (
1✔
11
    HelmChartFieldSet,
12
    HelmChartLintQuietField,
13
    HelmChartLintStrictField,
14
    HelmSkipLintField,
15
)
UNCOV
16
from pants.backend.helm.util_rules import tool
1✔
UNCOV
17
from pants.backend.helm.util_rules.chart import HelmChart, HelmChartRequest, get_helm_chart
1✔
UNCOV
18
from pants.backend.helm.util_rules.tool import HelmProcess
1✔
UNCOV
19
from pants.core.goals.lint import LintResult, LintTargetsRequest, Partitions
1✔
UNCOV
20
from pants.core.util_rules.partitions import Partition
1✔
UNCOV
21
from pants.engine.intrinsics import execute_process
1✔
UNCOV
22
from pants.engine.rules import collect_rules, concurrently, implicitly, rule
1✔
UNCOV
23
from pants.util.logging import LogLevel
1✔
24

UNCOV
25
logger = logging.getLogger(__name__)
1✔
26

27

UNCOV
28
@dataclass(frozen=True)
1✔
UNCOV
29
class HelmLintFieldSet(HelmChartFieldSet):
1✔
UNCOV
30
    lint_strict: HelmChartLintStrictField
1✔
UNCOV
31
    lint_quiet: HelmChartLintQuietField
1✔
UNCOV
32
    skip_lint: HelmSkipLintField
1✔
33

34

UNCOV
35
class HelmLintRequest(LintTargetsRequest):
1✔
UNCOV
36
    field_set_type = HelmLintFieldSet
1✔
UNCOV
37
    tool_subsystem = HelmSubsystem  # type: ignore[assignment]
1✔
38

39

UNCOV
40
@rule
1✔
UNCOV
41
async def partition_helm_lint(
1✔
42
    request: HelmLintRequest.PartitionRequest[HelmLintFieldSet],
43
) -> Partitions[HelmLintFieldSet, HelmChart]:
44
    field_sets = tuple(
×
45
        field_set for field_set in request.field_sets if not field_set.skip_lint.value
46
    )
47
    charts = await concurrently(
×
48
        get_helm_chart(HelmChartRequest(field_set), **implicitly()) for field_set in field_sets
49
    )
50
    return Partitions(
×
51
        Partition((field_set,), chart) for chart, field_set in zip(charts, field_sets)
52
    )
53

54

UNCOV
55
@rule(desc="Lint Helm charts", level=LogLevel.DEBUG)
1✔
UNCOV
56
async def run_helm_lint(
1✔
57
    request: HelmLintRequest.Batch[HelmLintFieldSet, HelmChart],
58
    helm_subsystem: HelmSubsystem,
59
) -> LintResult:
60
    assert len(request.elements) == 1
×
61
    assert request.partition_metadata is not None
×
62

63
    field_set = request.elements[0]
×
64
    chart = request.partition_metadata
×
65

66
    argv = ["lint", chart.name]
×
67

68
    strict = field_set.lint_strict.value or helm_subsystem.lint_strict
×
69
    if strict:
×
70
        argv.append("--strict")
×
71
    quiet = field_set.lint_quiet.value or helm_subsystem.lint_quiet
×
72
    if quiet:
×
73
        argv.append("--quiet")
×
74

75
    process_result = await execute_process(
×
76
        **implicitly(
77
            HelmProcess(
78
                argv,
79
                extra_immutable_input_digests=chart.immutable_input_digests,
80
                description=f"Linting chart: {chart.info.name}",
81
            )
82
        )
83
    )
84
    return LintResult.create(request, process_result)
×
85

86

UNCOV
87
def rules():
1✔
UNCOV
88
    return [*collect_rules(), *tool.rules(), *HelmLintRequest.rules()]
1✔
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