qontract-reconcile 0.10.2.dev279__py3-none-any.whl → 0.10.2.dev281__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qontract_reconcile-0.10.2.dev279.dist-info → qontract_reconcile-0.10.2.dev281.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev279.dist-info → qontract_reconcile-0.10.2.dev281.dist-info}/RECORD +76 -76
- reconcile/acs_policies.py +7 -7
- reconcile/aus/base.py +1 -1
- reconcile/aus/models.py +4 -5
- reconcile/aus/version_gate_approver.py +4 -1
- reconcile/aws_account_manager/merge_request_manager.py +5 -3
- reconcile/aws_ami_cleanup/integration.py +5 -8
- reconcile/aws_cloudwatch_log_retention/integration.py +6 -6
- reconcile/database_access_manager.py +1 -1
- reconcile/deadmanssnitch.py +1 -1
- reconcile/dynatrace_token_provider/ocm.py +10 -11
- reconcile/external_resources/aws.py +1 -1
- reconcile/external_resources/model.py +11 -11
- reconcile/external_resources/state.py +4 -4
- reconcile/fleet_labeler/dependencies.py +7 -3
- reconcile/fleet_labeler/ocm.py +6 -4
- reconcile/gitlab_housekeeping.py +2 -2
- reconcile/gitlab_permissions.py +1 -1
- reconcile/jenkins_webhooks.py +8 -4
- reconcile/jenkins_worker_fleets.py +2 -2
- reconcile/ocm_internal_notifications/integration.py +6 -4
- reconcile/ocm_labels/integration.py +7 -7
- reconcile/ocm_upgrade_scheduler_org_updater.py +2 -4
- reconcile/openshift_cluster_bots.py +1 -1
- reconcile/resource_scraper.py +1 -1
- reconcile/run_integration.py +1 -1
- reconcile/saas_auto_promotions_manager/integration.py +7 -3
- reconcile/saas_auto_promotions_manager/s3_exporter.py +6 -3
- reconcile/saas_file_validator.py +1 -2
- reconcile/skupper_network/models.py +4 -2
- reconcile/statuspage/page.py +1 -1
- reconcile/terraform_cloudflare_resources.py +1 -1
- reconcile/terraform_resources.py +1 -1
- reconcile/terraform_tgw_attachments.py +3 -3
- reconcile/terraform_users.py +1 -1
- reconcile/utils/aws_api.py +12 -30
- reconcile/utils/aws_api_typed/account.py +4 -4
- reconcile/utils/aws_api_typed/api.py +4 -2
- reconcile/utils/aws_api_typed/dynamodb.py +2 -2
- reconcile/utils/aws_api_typed/iam.py +2 -2
- reconcile/utils/aws_api_typed/organization.py +10 -7
- reconcile/utils/aws_api_typed/s3.py +2 -3
- reconcile/utils/aws_api_typed/service_quotas.py +4 -1
- reconcile/utils/aws_api_typed/sts.py +2 -2
- reconcile/utils/aws_api_typed/support.py +2 -2
- reconcile/utils/dynatrace/client.py +4 -1
- reconcile/utils/expiration.py +1 -1
- reconcile/utils/external_resource_spec.py +4 -2
- reconcile/utils/gitlab_api.py +4 -4
- reconcile/utils/glitchtip/models.py +4 -2
- reconcile/utils/jira_client.py +4 -4
- reconcile/utils/jobcontroller/models.py +8 -8
- reconcile/utils/mr/base.py +1 -1
- reconcile/utils/oc_connection_parameters.py +4 -1
- reconcile/utils/ocm/base.py +4 -1
- reconcile/utils/ocm/ocm.py +6 -5
- reconcile/utils/ocm/products.py +7 -4
- reconcile/utils/saasherder/interfaces.py +5 -2
- reconcile/utils/slack_api.py +4 -5
- reconcile/utils/state.py +9 -9
- reconcile/utils/terraform_client.py +1 -1
- reconcile/utils/terrascript_aws_client.py +8 -6
- reconcile/utils/vaultsecretref.py +1 -1
- reconcile/utils/vcs.py +14 -10
- reconcile/vault_replication.py +1 -1
- reconcile/vpc_peerings_validator.py +2 -4
- tools/app_interface_reporter.py +1 -2
- tools/cli_commands/erv2.py +7 -4
- tools/cli_commands/gpg_encrypt.py +4 -1
- tools/qontract_cli.py +13 -8
- tools/saas_metrics_exporter/commit_distance/channel.py +6 -3
- tools/saas_metrics_exporter/main.py +4 -1
- tools/saas_promotion_state/saas_promotion_state.py +4 -1
- {qontract_reconcile-0.10.2.dev279.dist-info → qontract_reconcile-0.10.2.dev281.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev279.dist-info → qontract_reconcile-0.10.2.dev281.dist-info}/entry_points.txt +0 -0
tools/cli_commands/erv2.py
CHANGED
@@ -3,13 +3,11 @@ from __future__ import annotations
|
|
3
3
|
import json
|
4
4
|
import os
|
5
5
|
import sys
|
6
|
-
from collections.abc import Iterator
|
7
6
|
from contextlib import contextmanager, suppress
|
8
7
|
from difflib import get_close_matches
|
9
8
|
from enum import Enum
|
10
|
-
from pathlib import Path
|
11
9
|
from subprocess import CalledProcessError, run
|
12
|
-
from typing import Any, Protocol
|
10
|
+
from typing import TYPE_CHECKING, Any, Protocol
|
13
11
|
|
14
12
|
from pydantic import BaseModel
|
15
13
|
from rich import print as rich_print
|
@@ -37,7 +35,12 @@ from reconcile.typed_queries.external_resources import (
|
|
37
35
|
)
|
38
36
|
from reconcile.utils import gql
|
39
37
|
from reconcile.utils.exceptions import FetchResourceError
|
40
|
-
|
38
|
+
|
39
|
+
if TYPE_CHECKING:
|
40
|
+
from collections.abc import Iterator
|
41
|
+
from pathlib import Path
|
42
|
+
|
43
|
+
from reconcile.utils.secret_reader import SecretReaderBase
|
41
44
|
|
42
45
|
UP = "\x1b[1A"
|
43
46
|
CLEAR = "\x1b[2K"
|
@@ -1,8 +1,8 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
3
|
import json
|
4
|
-
from collections.abc import Mapping
|
5
4
|
from dataclasses import dataclass
|
5
|
+
from typing import TYPE_CHECKING
|
6
6
|
|
7
7
|
from reconcile import queries
|
8
8
|
from reconcile.utils import (
|
@@ -12,6 +12,9 @@ from reconcile.utils import (
|
|
12
12
|
from reconcile.utils.oc import OC_Map
|
13
13
|
from reconcile.utils.secret_reader import SecretReader
|
14
14
|
|
15
|
+
if TYPE_CHECKING:
|
16
|
+
from collections.abc import Mapping
|
17
|
+
|
15
18
|
|
16
19
|
@dataclass
|
17
20
|
class GPGEncryptCommandData:
|
tools/qontract_cli.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#!/usr/bin/env python3
|
2
2
|
# ruff: noqa: PLC0415 - `import` should be at the top-level of a file
|
3
3
|
|
4
|
+
from __future__ import annotations
|
5
|
+
|
4
6
|
import base64
|
5
7
|
import json
|
6
8
|
import logging
|
@@ -10,7 +12,6 @@ import sys
|
|
10
12
|
import tempfile
|
11
13
|
import textwrap
|
12
14
|
from collections import defaultdict
|
13
|
-
from collections.abc import Callable, Iterable, Mapping
|
14
15
|
from datetime import (
|
15
16
|
UTC,
|
16
17
|
datetime,
|
@@ -83,7 +84,6 @@ from reconcile.gql_definitions.common.app_interface_vault_settings import (
|
|
83
84
|
AppInterfaceSettingsV1,
|
84
85
|
)
|
85
86
|
from reconcile.gql_definitions.common.clusters import ClusterSpecROSAV1
|
86
|
-
from reconcile.gql_definitions.fragments.aus_organization import AUSOCMOrganization
|
87
87
|
from reconcile.gql_definitions.glitchtip.glitchtip_instance import (
|
88
88
|
query as glitchtip_instance_query,
|
89
89
|
)
|
@@ -129,7 +129,6 @@ from reconcile.utils.early_exit_cache import (
|
|
129
129
|
EarlyExitCache,
|
130
130
|
)
|
131
131
|
from reconcile.utils.environ import environ
|
132
|
-
from reconcile.utils.external_resource_spec import ExternalResourceSpec
|
133
132
|
from reconcile.utils.external_resources import (
|
134
133
|
PROVIDER_AWS,
|
135
134
|
get_external_resource_specs,
|
@@ -141,9 +140,7 @@ from reconcile.utils.gitlab_api import (
|
|
141
140
|
MRStatus,
|
142
141
|
)
|
143
142
|
from reconcile.utils.glitchtip.client import GlitchtipClient
|
144
|
-
from reconcile.utils.glitchtip.models import Project, ProjectStatistics
|
145
143
|
from reconcile.utils.gql import GqlApiSingleton
|
146
|
-
from reconcile.utils.jjb_client import JJB
|
147
144
|
from reconcile.utils.keycloak import (
|
148
145
|
KeycloakAPI,
|
149
146
|
SSOClient,
|
@@ -197,9 +194,14 @@ from tools.sre_checkpoints import (
|
|
197
194
|
)
|
198
195
|
|
199
196
|
if TYPE_CHECKING:
|
197
|
+
from collections.abc import Callable, Iterable, Mapping
|
198
|
+
|
200
199
|
from mypy_boto3_s3.type_defs import CopySourceTypeDef
|
201
|
-
|
202
|
-
|
200
|
+
|
201
|
+
from reconcile.gql_definitions.fragments.aus_organization import AUSOCMOrganization
|
202
|
+
from reconcile.utils.external_resource_spec import ExternalResourceSpec
|
203
|
+
from reconcile.utils.glitchtip.models import Project, ProjectStatistics
|
204
|
+
from reconcile.utils.jjb_client import JJB
|
203
205
|
|
204
206
|
|
205
207
|
def output(function: Callable) -> Callable:
|
@@ -1031,6 +1033,9 @@ def clusters_network(ctx: click.Context, name: str) -> None:
|
|
1031
1033
|
ocm_map.get(cluster_name),
|
1032
1034
|
provided_assume_role=None,
|
1033
1035
|
)
|
1036
|
+
assert account is not None, (
|
1037
|
+
f"Failed to build assume role for cluster {cluster_name} in account {management_account['name']}"
|
1038
|
+
)
|
1034
1039
|
account["resourcesDefaultRegion"] = management_account[
|
1035
1040
|
"resourcesDefaultRegion"
|
1036
1041
|
]
|
@@ -1486,7 +1491,7 @@ def copy_tfstate(
|
|
1486
1491
|
session = aws.get_session(account["name"])
|
1487
1492
|
s3_client = aws.get_session_client(session, "s3", region)
|
1488
1493
|
copy_source = cast(
|
1489
|
-
CopySourceTypeDef,
|
1494
|
+
"CopySourceTypeDef",
|
1490
1495
|
{
|
1491
1496
|
"Bucket": source_bucket,
|
1492
1497
|
"Key": source_object_path,
|
@@ -1,10 +1,13 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from collections.abc import Iterable
|
4
3
|
from dataclasses import dataclass
|
4
|
+
from typing import TYPE_CHECKING
|
5
5
|
|
6
|
-
|
7
|
-
from
|
6
|
+
if TYPE_CHECKING:
|
7
|
+
from collections.abc import Iterable
|
8
|
+
|
9
|
+
from reconcile.typed_queries.saas_files import SaasFile
|
10
|
+
from reconcile.utils.secret_reader import HasSecret
|
8
11
|
|
9
12
|
|
10
13
|
@dataclass
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from
|
3
|
+
from typing import TYPE_CHECKING
|
4
4
|
|
5
5
|
import click
|
6
6
|
|
@@ -25,6 +25,9 @@ from tools.saas_metrics_exporter.commit_distance.commit_distance import (
|
|
25
25
|
CommitDistanceFetcher,
|
26
26
|
)
|
27
27
|
|
28
|
+
if TYPE_CHECKING:
|
29
|
+
from collections.abc import Callable
|
30
|
+
|
28
31
|
|
29
32
|
class SaasMetricsExporter:
|
30
33
|
"""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
from __future__ import annotations
|
2
2
|
|
3
|
-
from
|
3
|
+
from typing import TYPE_CHECKING
|
4
4
|
|
5
5
|
from reconcile.openshift_saas_deploy import (
|
6
6
|
QONTRACT_INTEGRATION as OPENSHIFT_SAAS_DEPLOY,
|
@@ -13,6 +13,9 @@ from reconcile.utils.promotion_state import PromotionData, PromotionState
|
|
13
13
|
from reconcile.utils.secret_reader import create_secret_reader
|
14
14
|
from reconcile.utils.state import init_state
|
15
15
|
|
16
|
+
if TYPE_CHECKING:
|
17
|
+
from collections.abc import Iterable
|
18
|
+
|
16
19
|
|
17
20
|
class SaasPromotionStateError(Exception):
|
18
21
|
pass
|
{qontract_reconcile-0.10.2.dev279.dist-info → qontract_reconcile-0.10.2.dev281.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|