qontract-reconcile 0.10.1rc485__py3-none-any.whl → 0.10.1rc486__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.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/RECORD +7 -7
- reconcile/openshift_resources_base.py +37 -10
- reconcile/test/test_prometheus_rules_tester.py +8 -11
- {qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc486
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Home-page: https://github.com/app-sre/qontract-reconcile
|
6
6
|
Author: Red Hat App-SRE Team
|
{qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/RECORD
RENAMED
@@ -68,7 +68,7 @@ reconcile/openshift_namespaces.py,sha256=DboMc6t0vXD54lL9ZP9P9fQnCRo2g_0z5FWubtW
|
|
68
68
|
reconcile/openshift_network_policies.py,sha256=_qqv7yj17OM1J8KJPsFmzFZ85gzESJeBocC672z4_WU,4231
|
69
69
|
reconcile/openshift_resourcequotas.py,sha256=yUi56PiOn3inMMfq_x_FEHmaW-reGipzoorjdar372g,2415
|
70
70
|
reconcile/openshift_resources.py,sha256=kwsY5cko7udEKNlhL2oKiKv_5wzEw9wmmwROE016ng8,1400
|
71
|
-
reconcile/openshift_resources_base.py,sha256=
|
71
|
+
reconcile/openshift_resources_base.py,sha256=ZhNVhotSbp2Ue3cMEqso-Cmug6vDV67lwX7pEvUpmbw,45787
|
72
72
|
reconcile/openshift_rolebindings.py,sha256=0sEKajdqVuBSzlagyPbLxtNXQdI2vyabmbIRifs0des,6629
|
73
73
|
reconcile/openshift_routes.py,sha256=fXvuPSjcjVw1X3j2EQvUAdbOepmIFdKk-M3qP8QzPiw,1075
|
74
74
|
reconcile/openshift_saas_deploy.py,sha256=MySDWBQN2N3rv_B8ifWzRY5t2Afq3DEVkFECHMpW_Sk,11908
|
@@ -407,7 +407,7 @@ reconcile/test/test_openshift_saas_deploy.py,sha256=YLJGkc--u5aP0UkQ-b9ZGEFGS2gw
|
|
407
407
|
reconcile/test/test_openshift_saas_deploy_change_tester.py,sha256=1yVe54Hx9YdVjn6qdnKge5Sa_s732c-8uZqCnuT1gGI,12871
|
408
408
|
reconcile/test/test_openshift_tekton_resources.py,sha256=RtRWsdm51S13OSkENC9nY_rOH0QELSCaO5tjF0XqIDI,11222
|
409
409
|
reconcile/test/test_openshift_upgrade_watcher.py,sha256=na5Q5l88c0ZHMh82gvNpYheoMOAzEZRG0ZvzzDhafYE,7100
|
410
|
-
reconcile/test/test_prometheus_rules_tester.py,sha256=
|
410
|
+
reconcile/test/test_prometheus_rules_tester.py,sha256=Qc9J4k0lSVie361lGr_cOy0EaBTD5LDqGZf7CYVFKr8,5677
|
411
411
|
reconcile/test/test_quay_membership.py,sha256=e29Giz5S9ckFgjpTO8PBo8qVPocIQmy4WqsRhgTFd9A,2643
|
412
412
|
reconcile/test/test_quay_mirror.py,sha256=-oPPFjx2OmzTwZ5oxblrvx2y4zzgUj8SYHdnjcOIqCE,5693
|
413
413
|
reconcile/test/test_quay_mirror_org.py,sha256=eudGIGCUlYul2UHx4Ku6zFvwLeJtRyOIx06XuwFox2U,2630
|
@@ -650,8 +650,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
650
650
|
tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
|
651
651
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
652
652
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
653
|
-
qontract_reconcile-0.10.
|
654
|
-
qontract_reconcile-0.10.
|
655
|
-
qontract_reconcile-0.10.
|
656
|
-
qontract_reconcile-0.10.
|
657
|
-
qontract_reconcile-0.10.
|
653
|
+
qontract_reconcile-0.10.1rc486.dist-info/METADATA,sha256=CTLduvx8nGxywJ0LUGJNXYjs7iNroxFIrxKuEOFMU-g,2348
|
654
|
+
qontract_reconcile-0.10.1rc486.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
655
|
+
qontract_reconcile-0.10.1rc486.dist-info/entry_points.txt,sha256=rTjAv28I_CHLM8ID3OPqMI_suoQ9s7tFbim4aYjn9kk,376
|
656
|
+
qontract_reconcile-0.10.1rc486.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
657
|
+
qontract_reconcile-0.10.1rc486.dist-info/RECORD,,
|
@@ -6,32 +6,55 @@ import logging
|
|
6
6
|
import re
|
7
7
|
import sys
|
8
8
|
from collections import defaultdict
|
9
|
-
from collections.abc import
|
9
|
+
from collections.abc import (
|
10
|
+
Iterable,
|
11
|
+
Mapping,
|
12
|
+
Sequence,
|
13
|
+
)
|
10
14
|
from contextlib import contextmanager
|
11
15
|
from dataclasses import dataclass
|
12
16
|
from functools import cache
|
13
17
|
from textwrap import indent
|
14
18
|
from threading import Lock
|
15
|
-
from typing import
|
19
|
+
from typing import (
|
20
|
+
Any,
|
21
|
+
Optional,
|
22
|
+
Protocol,
|
23
|
+
Tuple,
|
24
|
+
)
|
16
25
|
from urllib import parse
|
17
26
|
|
18
27
|
import anymarkup
|
19
28
|
import jinja2
|
20
29
|
import jinja2.sandbox
|
21
30
|
from deepdiff import DeepHash
|
22
|
-
from sretoolbox.utils import
|
31
|
+
from sretoolbox.utils import (
|
32
|
+
retry,
|
33
|
+
threaded,
|
34
|
+
)
|
23
35
|
|
24
36
|
import reconcile.openshift_base as ob
|
25
37
|
from reconcile import queries
|
26
38
|
from reconcile.change_owners.diff import IDENTIFIER_FIELD_NAME
|
27
39
|
from reconcile.checkpoint import url_makes_sense
|
28
40
|
from reconcile.github_users import init_github
|
29
|
-
from reconcile.
|
30
|
-
|
41
|
+
from reconcile.utils import (
|
42
|
+
amtool,
|
43
|
+
gql,
|
44
|
+
openssl,
|
45
|
+
)
|
31
46
|
from reconcile.utils.defer import defer
|
32
47
|
from reconcile.utils.exceptions import FetchResourceError
|
33
|
-
from reconcile.utils.jinja2_ext import
|
34
|
-
|
48
|
+
from reconcile.utils.jinja2_ext import (
|
49
|
+
B64EncodeExtension,
|
50
|
+
RaiseErrorExtension,
|
51
|
+
)
|
52
|
+
from reconcile.utils.oc import (
|
53
|
+
OC_Map,
|
54
|
+
OCClient,
|
55
|
+
OCLogMsg,
|
56
|
+
StatusCodeError,
|
57
|
+
)
|
35
58
|
from reconcile.utils.openshift_resource import (
|
36
59
|
ConstructResourceError,
|
37
60
|
ResourceInventory,
|
@@ -44,7 +67,10 @@ from reconcile.utils.runtime.integration import DesiredStateShardConfig
|
|
44
67
|
from reconcile.utils.secret_reader import SecretReader
|
45
68
|
from reconcile.utils.semver_helper import make_semver
|
46
69
|
from reconcile.utils.sharding import is_in_shard
|
47
|
-
from reconcile.utils.vault import
|
70
|
+
from reconcile.utils.vault import (
|
71
|
+
SecretVersionIsNone,
|
72
|
+
SecretVersionNotFound,
|
73
|
+
)
|
48
74
|
|
49
75
|
# +-----------------------+-------------------------+-------------+
|
50
76
|
# | Current / Desired | Present | Not Present |
|
@@ -461,8 +487,6 @@ def fetch_provider_resource(
|
|
461
487
|
) -> OR:
|
462
488
|
path = resource["path"]
|
463
489
|
content = resource["content"]
|
464
|
-
gqlapi = gql.get_api()
|
465
|
-
app_int_base_url = get_app_interface_repo_url(query_func=gqlapi.query)
|
466
490
|
if tfunc:
|
467
491
|
content = tfunc(body=content, vars=tvars, settings=settings)
|
468
492
|
|
@@ -511,6 +535,9 @@ def fetch_provider_resource(
|
|
511
535
|
|
512
536
|
if add_path_to_prom_rules:
|
513
537
|
if body["kind"] == "PrometheusRule":
|
538
|
+
app_int_base_url = "https://gitlab.cee.redhat.com/service/app-interface"
|
539
|
+
if settings and "repoUrl" in settings:
|
540
|
+
app_int_base_url = settings["repoUrl"]
|
514
541
|
try:
|
515
542
|
groups = body["spec"]["groups"]
|
516
543
|
for group in groups:
|
@@ -1,17 +1,20 @@
|
|
1
1
|
from typing import Any
|
2
|
-
from unittest.mock import
|
2
|
+
from unittest.mock import (
|
3
|
+
create_autospec,
|
4
|
+
patch,
|
5
|
+
)
|
3
6
|
|
4
7
|
import pytest
|
5
8
|
|
6
|
-
from reconcile.gql_definitions.common.app_interface_repo_settings import (
|
7
|
-
DEFINITION as SETTINGS_QUERY,
|
8
|
-
)
|
9
9
|
from reconcile.gql_definitions.common.app_interface_vault_settings import (
|
10
10
|
AppInterfaceSettingsV1,
|
11
11
|
)
|
12
12
|
from reconcile.openshift_resources_base import NAMESPACES_QUERY
|
13
13
|
from reconcile.prometheus_rules_tester.integration import Test as PTest
|
14
|
-
from reconcile.prometheus_rules_tester.integration import
|
14
|
+
from reconcile.prometheus_rules_tester.integration import (
|
15
|
+
check_rules_and_tests,
|
16
|
+
run,
|
17
|
+
)
|
15
18
|
from reconcile.status import ExitCodes
|
16
19
|
from reconcile.utils import gql
|
17
20
|
|
@@ -39,12 +42,6 @@ class TestPrometheusRulesTester:
|
|
39
42
|
"""Mock for GqlApi.query using test_data set in setup_method."""
|
40
43
|
if query == NAMESPACES_QUERY:
|
41
44
|
return {"namespaces": self.ns_data}
|
42
|
-
if query == SETTINGS_QUERY:
|
43
|
-
return {
|
44
|
-
"settings": [
|
45
|
-
{"repoUrl": "https://gitlab.cee.redhat.com/service/app-interface"}
|
46
|
-
]
|
47
|
-
}
|
48
45
|
|
49
46
|
raise TstUnsupportedGqlQueryError("Unsupported query")
|
50
47
|
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc485.dist-info → qontract_reconcile-0.10.1rc486.dist-info}/top_level.txt
RENAMED
File without changes
|