qontract-reconcile 0.10.1rc277__py3-none-any.whl → 0.10.1rc279__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.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/METADATA +2 -2
- {qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/RECORD +8 -8
- reconcile/gql_definitions/status_board/status_board.py +10 -0
- reconcile/test/test_status_board.py +13 -2
- reconcile/typed_queries/status_board.py +13 -10
- {qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.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.1rc279
|
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
|
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
13
13
|
Requires-Python: >=3.11
|
14
|
-
Requires-Dist: sretoolbox ~=2.4.
|
14
|
+
Requires-Dist: sretoolbox ~=2.4.2
|
15
15
|
Requires-Dist: Click <9.0,>=7.0
|
16
16
|
Requires-Dist: gql ==3.1.0
|
17
17
|
Requires-Dist: toml <0.11.0,>=0.10.0
|
{qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/RECORD
RENAMED
@@ -248,7 +248,7 @@ reconcile/gql_definitions/slack_usergroups/clusters.py,sha256=EsnwVAGFtuev787toH
|
|
248
248
|
reconcile/gql_definitions/slack_usergroups/permissions.py,sha256=fhBQT2uwCi2N5ZEIZhzrzjVvNllp12R0ZS1AVVEM2dA,5519
|
249
249
|
reconcile/gql_definitions/slack_usergroups/users.py,sha256=YS6PkZAHy2ZzECTvdO3F6iHGRcEdOswCzsRjifjpMvI,2877
|
250
250
|
reconcile/gql_definitions/status_board/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
251
|
-
reconcile/gql_definitions/status_board/status_board.py,sha256=
|
251
|
+
reconcile/gql_definitions/status_board/status_board.py,sha256=tWtEW_RNNmLd6b595VAl1wktllkUCqfwPEfblq91rao,4415
|
252
252
|
reconcile/gql_definitions/statuspage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
253
253
|
reconcile/gql_definitions/statuspage/statuspages.py,sha256=fKHYMDfdrRLPpKjdtkTjSIkyuYdna0ezAFbj2rcE7L0,3538
|
254
254
|
reconcile/gql_definitions/terraform_cloudflare_dns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -384,7 +384,7 @@ reconcile/test/test_secret_reader.py,sha256=kz7nzcPjvA08cytnvcA_PMA98AEyqJWsESkY
|
|
384
384
|
reconcile/test/test_slack_base.py,sha256=gpbWOLNxMMX6fyAbs1JakhLTnwfedb3f7WpUae4tQZE,5060
|
385
385
|
reconcile/test/test_slack_usergroups.py,sha256=O2CNs2t1kNdAG_NqUhf5yr4K0Q-9ZLuXdQ4G_kYxatw,23647
|
386
386
|
reconcile/test/test_sql_query.py,sha256=l0QyIflcErIrAwSP8kOIub0jO6oi0Ncuns5IJtnuaxM,455
|
387
|
-
reconcile/test/test_status_board.py,sha256=
|
387
|
+
reconcile/test/test_status_board.py,sha256=WdAq4pFoWWqcOcfgMzssZD3xfvT1QLrEHJqUARldtvA,7875
|
388
388
|
reconcile/test/test_terraform_aws_route53.py,sha256=xHggb8K1P76OyCfFcogbkmyKle-NlUylcbDnuv3IqvY,771
|
389
389
|
reconcile/test/test_terraform_cloudflare_dns.py,sha256=aQTXX8Vr4h9aWvJZTnpZEhMGYoBpT2d45ZxU_ECIQ6o,3425
|
390
390
|
reconcile/test/test_terraform_cloudflare_resources.py,sha256=cWNE2UIhz19rLSWdpJG8xRwuEEYoIZWEkDZY7e2QN_g,3426
|
@@ -449,7 +449,7 @@ reconcile/typed_queries/pagerduty_instances.py,sha256=QCHqEAakiH6eSob0Pnnn3IBd8G
|
|
449
449
|
reconcile/typed_queries/repos.py,sha256=RKBsf7IDS6NsXTtXxJ9Ol9G3bxG9sr3vW9QQ2bahEHo,512
|
450
450
|
reconcile/typed_queries/saas_files.py,sha256=idI0NyPpgSfXVAA-LlQ_BsX_p388GhTh1mHT1IBn71w,11874
|
451
451
|
reconcile/typed_queries/smtp.py,sha256=aSLglYa5bHKmlGwKkxq2RZqyMWuAf0a4S_mOuhDa084,542
|
452
|
-
reconcile/typed_queries/status_board.py,sha256=
|
452
|
+
reconcile/typed_queries/status_board.py,sha256=naxJHb13uqgX6ZkI6cVtNjFUEdbEHIkZkRmimlRAiwA,1593
|
453
453
|
reconcile/typed_queries/tekton_pipeline_providers.py,sha256=2mpHBdsNPQB94tw0H9aenGuqj8EEjYolQ03YEq1CpiY,546
|
454
454
|
reconcile/typed_queries/terraform_namespaces.py,sha256=71ARJ-GzkU9tBM0IfJTL3NF4349SJy-Mgs_DwAgUz_g,444
|
455
455
|
reconcile/typed_queries/terraform_tgw_attachments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -595,8 +595,8 @@ tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
595
595
|
tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
|
596
596
|
tools/test/test_sd_app_sre_alert_report.py,sha256=JeLhgzpKCPgLvptwg_4ZvJHLVWKNG1T5845HXTkMBxA,1826
|
597
597
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
598
|
-
qontract_reconcile-0.10.
|
599
|
-
qontract_reconcile-0.10.
|
600
|
-
qontract_reconcile-0.10.
|
601
|
-
qontract_reconcile-0.10.
|
602
|
-
qontract_reconcile-0.10.
|
598
|
+
qontract_reconcile-0.10.1rc279.dist-info/METADATA,sha256=k0TkzA3F1OuRiJdOdiYZUvnibz2cflZjJey6VM3G_Nk,2224
|
599
|
+
qontract_reconcile-0.10.1rc279.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
600
|
+
qontract_reconcile-0.10.1rc279.dist-info/entry_points.txt,sha256=ErVY2Jp-0Rtuq5KOtMlW5yvna4nIEuc_1YbEdEdcy9o,301
|
601
|
+
qontract_reconcile-0.10.1rc279.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
602
|
+
qontract_reconcile-0.10.1rc279.dist-info/RECORD,,
|
@@ -48,6 +48,10 @@ query StatusBoard {
|
|
48
48
|
app {
|
49
49
|
name
|
50
50
|
onboardingStatus
|
51
|
+
childrenApps {
|
52
|
+
name
|
53
|
+
onboardingStatus
|
54
|
+
}
|
51
55
|
}
|
52
56
|
}
|
53
57
|
}
|
@@ -90,9 +94,15 @@ class ProductV1(ConfiguredBaseModel):
|
|
90
94
|
name: str = Field(..., alias="name")
|
91
95
|
|
92
96
|
|
97
|
+
class AppV1_AppV1(ConfiguredBaseModel):
|
98
|
+
name: str = Field(..., alias="name")
|
99
|
+
onboarding_status: str = Field(..., alias="onboardingStatus")
|
100
|
+
|
101
|
+
|
93
102
|
class AppV1(ConfiguredBaseModel):
|
94
103
|
name: str = Field(..., alias="name")
|
95
104
|
onboarding_status: str = Field(..., alias="onboardingStatus")
|
105
|
+
children_apps: Optional[list[AppV1_AppV1]] = Field(..., alias="childrenApps")
|
96
106
|
|
97
107
|
|
98
108
|
class NamespaceV1(ConfiguredBaseModel):
|
@@ -71,7 +71,18 @@ def status_board(gql_class_factory: Callable[..., StatusBoardV1]) -> StatusBoard
|
|
71
71
|
"onboardingStatus": "OnBoarded",
|
72
72
|
}
|
73
73
|
},
|
74
|
-
{
|
74
|
+
{
|
75
|
+
"app": {
|
76
|
+
"name": "foo",
|
77
|
+
"onboardingStatus": "OnBoarded",
|
78
|
+
"childrenApps": [
|
79
|
+
{
|
80
|
+
"name": "bar",
|
81
|
+
"onboardingStatus": "OnBoarded",
|
82
|
+
},
|
83
|
+
],
|
84
|
+
}
|
85
|
+
},
|
75
86
|
{"app": {"name": "oof", "onboardingStatus": "BestEffort"}},
|
76
87
|
],
|
77
88
|
"product": {
|
@@ -109,7 +120,7 @@ def test_status_board_handler(mocker: MockerFixture) -> None:
|
|
109
120
|
|
110
121
|
def test_get_product_apps(status_board: StatusBoardV1) -> None:
|
111
122
|
p = StatusBoardExporterIntegration.get_product_apps(status_board)
|
112
|
-
assert p == {"foo": {"foo"}}
|
123
|
+
assert p == {"foo": {"foo", "foo-bar"}}
|
113
124
|
|
114
125
|
|
115
126
|
def test_get_diff_create_app() -> None:
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from typing import (
|
2
|
+
Any,
|
2
3
|
Callable,
|
3
4
|
Iterable,
|
4
5
|
Optional,
|
@@ -26,21 +27,23 @@ def get_selected_app_names(
|
|
26
27
|
global_selectors: Iterable[str],
|
27
28
|
product: StatusBoardProductV1,
|
28
29
|
) -> set[str]:
|
29
|
-
selected_app_names: set[str] =
|
30
|
-
|
31
|
-
|
30
|
+
selected_app_names: set[str] = set()
|
31
|
+
apps: dict[str, Any] = {"apps": []}
|
32
|
+
for namespace in product.product_environment.namespaces or []:
|
33
|
+
selected_app_names.add(namespace.app.name)
|
34
|
+
apps["apps"].append(namespace.app.dict(by_alias=True))
|
35
|
+
|
36
|
+
for child in namespace.app.children_apps or []:
|
37
|
+
selected_app_names.add(f"{namespace.app.name}-{child.name}")
|
38
|
+
child_dict = child.dict(by_alias=True)
|
39
|
+
child_dict["name"] = f"{namespace.app.name}-{child.name}"
|
40
|
+
apps["apps"].append(child_dict)
|
41
|
+
print(child_dict)
|
32
42
|
|
33
43
|
selectors = set(global_selectors)
|
34
44
|
if product.app_selectors:
|
35
45
|
selectors.update(product.app_selectors.exclude or [])
|
36
46
|
|
37
|
-
apps = {
|
38
|
-
"apps": [
|
39
|
-
a.app.dict(by_alias=True)
|
40
|
-
for a in product.product_environment.namespaces or []
|
41
|
-
],
|
42
|
-
}
|
43
|
-
|
44
47
|
for selector in selectors:
|
45
48
|
apps_to_remove: set[str] = set()
|
46
49
|
results = parser.parse(selector).find(apps)
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc277.dist-info → qontract_reconcile-0.10.1rc279.dist-info}/top_level.txt
RENAMED
File without changes
|