qontract-reconcile 0.10.1rc872__py3-none-any.whl → 0.10.1rc874__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.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/RECORD +7 -7
- reconcile/templating/renderer.py +13 -12
- reconcile/terraform_vpc_resources/integration.py +9 -0
- {qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.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.1rc874
|
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.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/RECORD
RENAMED
@@ -461,7 +461,7 @@ reconcile/templates/jira-checkpoint-missinginfo.j2,sha256=c_Vvg-lEENsB3tgxm9B6Y9
|
|
461
461
|
reconcile/templates/rosa-classic-cluster-creation.sh.j2,sha256=0UHfYtXRVJqP07VJQx456cRI6EbZNBgamtP_8nb4WPY,2353
|
462
462
|
reconcile/templates/rosa-hcp-cluster-creation.sh.j2,sha256=O7Bf3WQIJhsZoEqaYA0wRktUO4yXXCb4BQkuvvp-C80,2385
|
463
463
|
reconcile/templating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
464
|
-
reconcile/templating/renderer.py,sha256=
|
464
|
+
reconcile/templating/renderer.py,sha256=HfPjE7bl8RjpZbesgfx8HYCfHimkdYO7whst5HJsFeY,10851
|
465
465
|
reconcile/templating/validator.py,sha256=pvDEc6veznEZzjypkoRJUGMMFLWosU-zd7i3j7JeNjE,4670
|
466
466
|
reconcile/templating/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
467
467
|
reconcile/templating/lib/merge_request_manager.py,sha256=JUkfF3smaQ8onzKF5F7UpmA7MWaQpftANy6dDo1FCug,5464
|
@@ -472,7 +472,7 @@ reconcile/terraform_init/integration.py,sha256=xcFKTc_or3xB3kE_I3OECNkkgbwALIwwd
|
|
472
472
|
reconcile/terraform_init/merge_request.py,sha256=3CYtgSd7Q9zjKg4wsDz437EPCRfGeZZ8fZ0Y-ChKXJY,1475
|
473
473
|
reconcile/terraform_init/merge_request_manager.py,sha256=fMcT6hbdEF3nFATJpvr8BedvQHq_MzFkgVJSloBNwOQ,3101
|
474
474
|
reconcile/terraform_vpc_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
475
|
-
reconcile/terraform_vpc_resources/integration.py,sha256=
|
475
|
+
reconcile/terraform_vpc_resources/integration.py,sha256=OOi29VUtlAhCgeUV86UlWCK72dNTp8tgXX6SXLpuMr8,8113
|
476
476
|
reconcile/terraform_vpc_resources/merge_request.py,sha256=loRymUigCIvaaT0s_NzktZchh-DGRQnCICdBSCAcFPY,1503
|
477
477
|
reconcile/terraform_vpc_resources/merge_request_manager.py,sha256=Vj2nuQbQyrL4q_il1My-bLxYNh_r3YXqX45P8fwtP6Q,3259
|
478
478
|
reconcile/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -837,8 +837,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
837
837
|
tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
|
838
838
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
839
839
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
840
|
-
qontract_reconcile-0.10.
|
841
|
-
qontract_reconcile-0.10.
|
842
|
-
qontract_reconcile-0.10.
|
843
|
-
qontract_reconcile-0.10.
|
844
|
-
qontract_reconcile-0.10.
|
840
|
+
qontract_reconcile-0.10.1rc874.dist-info/METADATA,sha256=nu-twTVjR_c5WOALYublxTDjBa_09VoDhqkvXcgkLnQ,2273
|
841
|
+
qontract_reconcile-0.10.1rc874.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
842
|
+
qontract_reconcile-0.10.1rc874.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
843
|
+
qontract_reconcile-0.10.1rc874.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
844
|
+
qontract_reconcile-0.10.1rc874.dist-info/RECORD,,
|
reconcile/templating/renderer.py
CHANGED
@@ -3,6 +3,7 @@ import os
|
|
3
3
|
import tempfile
|
4
4
|
from abc import ABC, abstractmethod
|
5
5
|
from collections.abc import Callable
|
6
|
+
from pathlib import Path
|
6
7
|
from typing import Any, Optional, Self
|
7
8
|
|
8
9
|
from deepdiff import DeepHash
|
@@ -30,6 +31,7 @@ from reconcile.typed_queries.gitlab_instances import get_gitlab_instances
|
|
30
31
|
from reconcile.utils import gql
|
31
32
|
from reconcile.utils.git import clone
|
32
33
|
from reconcile.utils.gql import init_from_config
|
34
|
+
from reconcile.utils.jinja2.utils import process_jinja2_template
|
33
35
|
from reconcile.utils.ruamel import create_ruamel_instance
|
34
36
|
from reconcile.utils.runtime.integration import (
|
35
37
|
PydanticRunParams,
|
@@ -85,12 +87,9 @@ class LocalFilePersistence(FilePersistence):
|
|
85
87
|
|
86
88
|
def write(self, outputs: list[TemplateOutput]) -> None:
|
87
89
|
for output in outputs:
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
encoding="utf-8",
|
92
|
-
) as f:
|
93
|
-
f.write(output.content)
|
90
|
+
filepath = Path(join_path(self.app_interface_data_path, output.path))
|
91
|
+
filepath.parent.mkdir(parents=True, exist_ok=True)
|
92
|
+
filepath.write_text(output.content, encoding="utf-8")
|
94
93
|
|
95
94
|
def read(self, path: str) -> Optional[str]:
|
96
95
|
return self._read_local_file(join_path(self.app_interface_data_path, path))
|
@@ -166,12 +165,14 @@ def unpack_static_variables(
|
|
166
165
|
def unpack_dynamic_variables(
|
167
166
|
collection_variables: TemplateCollectionVariablesV1, gql: gql.GqlApi
|
168
167
|
) -> dict[str, dict[str, Any]]:
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
168
|
+
static = collection_variables.static or {}
|
169
|
+
dynamic: dict[str, dict[str, Any]] = {}
|
170
|
+
for dv in collection_variables.dynamic or []:
|
171
|
+
query = process_jinja2_template(
|
172
|
+
body=dv.query, vars={"static": static, "dynamic": dynamic}
|
173
|
+
)
|
174
|
+
dynamic[dv.name] = gql.query(query) or {}
|
175
|
+
return dynamic
|
175
176
|
|
176
177
|
|
177
178
|
def calc_template_hash(c: TemplateCollectionV1, variables: dict[str, Any]) -> str:
|
@@ -70,7 +70,14 @@ class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesPa
|
|
70
70
|
"""Receives a terraform outputs dict and returns a map of outputs per VPC requests"""
|
71
71
|
outputs_per_request: MutableMapping[str, Any] = {}
|
72
72
|
for request in requests:
|
73
|
+
# Skiping requests that don't have outputs,
|
74
|
+
# this happens because we are not filtering the requests
|
75
|
+
# when running the integration for a single account with --account-name
|
76
|
+
if request.account.name not in outputs.keys():
|
77
|
+
continue
|
78
|
+
|
73
79
|
outputs_per_request[request.identifier] = []
|
80
|
+
|
74
81
|
outputs_per_account = outputs[request.account.name]
|
75
82
|
|
76
83
|
# If the output exists for that request get its value
|
@@ -163,6 +170,8 @@ class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesPa
|
|
163
170
|
|
164
171
|
tf_client.apply()
|
165
172
|
|
173
|
+
tf_client.init_outputs()
|
174
|
+
|
166
175
|
handled_output = self._handle_outputs(data, tf_client.outputs)
|
167
176
|
|
168
177
|
# MR and template Management
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc872.dist-info → qontract_reconcile-0.10.1rc874.dist-info}/top_level.txt
RENAMED
File without changes
|