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

pantsbuild / pants / 18913303678

29 Oct 2025 03:29PM UTC coverage: 80.004% (-0.3%) from 80.283%
18913303678

push

github

web-flow
Updating 3rd party lockfiles for PBS script and MyPy (#22796)

Also small bumps to fastapi and starlette, which updated over the last few days. Starlette updated for features, and then a security vulnerability.

Fastapi bumped just for starlette.

88 of 93 new or added lines in 73 files covered. (94.62%)

221 existing lines in 15 files now uncovered.

77334 of 96663 relevant lines covered (80.0%)

5.2 hits per line

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

0.0
/src/python/pants/backend/helm/goals/deploy.py
1
# Copyright 2020 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.docker.goals.package_image import DockerPackageFieldSet
×
UNCOV
10
from pants.backend.helm.dependency_inference import deployment
×
UNCOV
11
from pants.backend.helm.subsystems.helm import HelmSubsystem
×
UNCOV
12
from pants.backend.helm.subsystems.post_renderer import setup_post_renderer_launcher
×
UNCOV
13
from pants.backend.helm.target_types import (
×
14
    HelmDeploymentFieldSet,
15
    HelmDeploymentTarget,
16
    HelmDeploymentTimeoutField,
17
)
UNCOV
18
from pants.backend.helm.util_rules import post_renderer
×
UNCOV
19
from pants.backend.helm.util_rules.post_renderer import HelmDeploymentPostRendererRequest
×
UNCOV
20
from pants.backend.helm.util_rules.renderer import (
×
21
    HelmDeploymentCmd,
22
    HelmDeploymentRequest,
23
    materialize_deployment_process_wrapper_into_interactive_process,
24
)
UNCOV
25
from pants.core.goals.deploy import DeployFieldSet, DeployProcess, DeploySubsystem
×
UNCOV
26
from pants.engine.internals.graph import resolve_targets
×
UNCOV
27
from pants.engine.rules import collect_rules, concurrently, implicitly, rule
×
UNCOV
28
from pants.engine.target import DependenciesRequest
×
UNCOV
29
from pants.engine.unions import UnionRule
×
UNCOV
30
from pants.util.docutil import bin_name
×
UNCOV
31
from pants.util.logging import LogLevel
×
UNCOV
32
from pants.util.strutil import softwrap
×
33

UNCOV
34
logger = logging.getLogger(__name__)
×
35

36

UNCOV
37
@dataclass(frozen=True)
×
UNCOV
38
class DeployHelmDeploymentFieldSet(HelmDeploymentFieldSet, DeployFieldSet):
×
UNCOV
39
    timeout: HelmDeploymentTimeoutField
×
40

41

UNCOV
42
@rule(desc="Run Helm deploy process", level=LogLevel.DEBUG)
×
UNCOV
43
async def run_helm_deploy(
×
44
    field_set: DeployHelmDeploymentFieldSet,
45
    helm_subsystem: HelmSubsystem,
46
    deploy_subsystem: DeploySubsystem,
47
) -> DeployProcess:
48
    dry_run_args = ["--dry-run"] if deploy_subsystem.dry_run else []
×
49
    passthrough_args = helm_subsystem.valid_args(
×
50
        extra_help=softwrap(
51
            f"""
52
            Most invalid arguments have equivalent fields in the `{HelmDeploymentTarget.alias}` target.
53
            Usage of fields is encouraged over passthrough arguments as that enables repeatable deployments.
54

55
            Please run `{bin_name()} help {HelmDeploymentTarget.alias}` for more information.
56

57
            To use `--dry-run`, run `{bin_name()} experimental-deploy --dry-run ::`.
58
            """
59
        )
60
    )
61

62
    target_dependencies, post_renderer = await concurrently(
×
63
        resolve_targets(**implicitly(DependenciesRequest(field_set.dependencies))),
64
        setup_post_renderer_launcher(**implicitly(HelmDeploymentPostRendererRequest(field_set))),
65
    )
66

67
    publish_targets = [
×
68
        tgt for tgt in target_dependencies if DockerPackageFieldSet.is_applicable(tgt)
69
    ]
70

71
    interactive_process = await materialize_deployment_process_wrapper_into_interactive_process(
×
72
        **implicitly(
73
            HelmDeploymentRequest(
74
                cmd=HelmDeploymentCmd.UPGRADE,
75
                field_set=field_set,
76
                extra_argv=[
77
                    "--install",
78
                    *(
79
                        ("--timeout", f"{field_set.timeout.value}s")
80
                        if field_set.timeout.value
81
                        else ()
82
                    ),
83
                    *passthrough_args,
84
                    *dry_run_args,
85
                ],
86
                post_renderer=post_renderer,
87
                description=f"Running Helm deployment: {field_set.address}",
88
            )
89
        )
90
    )
91

92
    return DeployProcess(
×
93
        name=field_set.address.spec,
94
        publish_dependencies=tuple(publish_targets),
95
        process=interactive_process,
96
    )
97

98

UNCOV
99
def rules():
×
UNCOV
100
    return [
×
101
        *collect_rules(),
102
        *deployment.rules(),
103
        *post_renderer.rules(),
104
        UnionRule(DeployFieldSet, DeployHelmDeploymentFieldSet),
105
    ]
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

© 2025 Coveralls, Inc