qontract-reconcile 0.9.1rc222__py3-none-any.whl → 0.9.1rc224__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.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/RECORD +9 -9
- reconcile/cli.py +1 -1
- reconcile/terraform_cloudflare_dns.py +3 -7
- reconcile/utils/sentry_client.py +7 -7
- reconcile/utils/vault.py +6 -5
- {qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.9.
|
3
|
+
Version: 0.9.1rc224
|
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
|
@@ -16,7 +16,7 @@ reconcile/aws_iam_password_reset.py,sha256=GDoBo4VFSABgRFjEfwRXlXlNGb7beVt5pSrNr
|
|
16
16
|
reconcile/aws_support_cases_sos.py,sha256=i6bSWnlH9fh14P14PjVhFLwNl-q3fD733_rXKM_O51c,2992
|
17
17
|
reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=W_VJagnsJR1v5oqjlI3RJJE0_nhtJ0m81RS8zWA5u5c,3538
|
18
18
|
reconcile/checkpoint.py,sha256=figtZRuWUvdpdSnkhAqeGvO5dI02TT6J3heyeFhlwqM,5016
|
19
|
-
reconcile/cli.py,sha256=
|
19
|
+
reconcile/cli.py,sha256=rHAMkvPwt---iPbQ2XloG7zrguvoO7Yz-0ZZiDrilwQ,72161
|
20
20
|
reconcile/closedbox_endpoint_monitoring_base.py,sha256=0xg_d8dwd36Y8GY1mE-LLO1LQpPEMM77bzAfc_KdgzU,4870
|
21
21
|
reconcile/cluster_deployment_mapper.py,sha256=2Ah-nu-Mdig0pjuiZl_XLrmVAjYzFjORR3dMlCgkmw0,2352
|
22
22
|
reconcile/dashdotdb_base.py,sha256=Ca75-OQiu5HeA8Q6zQpEYuhyCSjeuWe99K4y9ipTORM,4032
|
@@ -121,7 +121,7 @@ reconcile/sql_query.py,sha256=AtJQseNBzigiY3Ii4Je0DDBDj8sxzsCTaxLyIaXkPcU,22432
|
|
121
121
|
reconcile/status.py,sha256=tRYtzPFsGETOfN57rcsLIJRl7cZVFkfQXNsUtoeJ7ns,545
|
122
122
|
reconcile/template_tester.py,sha256=vZz8GM46waQUGd3OVnhW5OLTqctFMH_Hh1QXxT5hduM,2384
|
123
123
|
reconcile/terraform_aws_route53.py,sha256=06VIlIb95BzVkxV_1TPiaY9sQO-TkvQXL4V_qzuXxxA,9814
|
124
|
-
reconcile/terraform_cloudflare_dns.py,sha256=
|
124
|
+
reconcile/terraform_cloudflare_dns.py,sha256=AiWI4_uR4UgJ26_YMoNFAUG92Row3ne2aa5BJplqFR8,12569
|
125
125
|
reconcile/terraform_cloudflare_resources.py,sha256=BQg12mHm1iaxf086FFPZutPbWKUMaddqu-nREPR8ptA,14887
|
126
126
|
reconcile/terraform_cloudflare_users.py,sha256=lTbrxi8OtW9Pfcr7Yp-70ihldMQKx9dJ7ZgbGHey1XE,13627
|
127
127
|
reconcile/terraform_resources.py,sha256=gQ-LT0TGwf9OR4RF5EWDmNHUnKWnbhrIMtyIdUgP4D4,16782
|
@@ -446,7 +446,7 @@ reconcile/utils/raw_github_api.py,sha256=ZHC-SZuAyRe1zaMoOU7Krt1-zecDxENd9c_NzQY
|
|
446
446
|
reconcile/utils/repo_owners.py,sha256=j-pUjc9PuDzq7KpjNLpnhqfU8tUG4nj2WMhFp4ick7g,6629
|
447
447
|
reconcile/utils/secret_reader.py,sha256=eHbFZIBtr7BZ3YIrHcVzxwqy-Xw_8RexVkhmZGSa2sg,10361
|
448
448
|
reconcile/utils/semver_helper.py,sha256=4Rrkz9Cj9A6oHPVgA-nGj6MBoxlFT4eyxTcslWqow3I,771
|
449
|
-
reconcile/utils/sentry_client.py,sha256=
|
449
|
+
reconcile/utils/sentry_client.py,sha256=UqJfI0xTSVrqy4j3Os4olU8Ph-qq4V9-m0RLB_73M-w,12001
|
450
450
|
reconcile/utils/sharding.py,sha256=gkYf0lD3IUKQPEmdRJZ70mdDT1c9qWjbdP7evRsUis4,839
|
451
451
|
reconcile/utils/slack_api.py,sha256=Jdk8lIc9h9waj2R8JqRo3nkAV2wfoUdMvZv0wIJgeCU,13954
|
452
452
|
reconcile/utils/smtp_client.py,sha256=gJNbBQJpAt5PX4t_TaeNHsXM8vt50bFgndml6yK2b5o,2800
|
@@ -458,7 +458,7 @@ reconcile/utils/terraform_client.py,sha256=AYnA1pW7JgNuroHzhrLW8gZ8yN-pLKwH_aAnR
|
|
458
458
|
reconcile/utils/terrascript_aws_client.py,sha256=h5bCWv7MUk4b_dS3as4Aq9uyMcTxxDaT6tBj67tE0Hg,251172
|
459
459
|
reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
|
460
460
|
reconcile/utils/unleash.py,sha256=xY8fXxJApZhYnhJHmqNAK1YPNWf6larzDtk0VuNvn08,2875
|
461
|
-
reconcile/utils/vault.py,sha256=
|
461
|
+
reconcile/utils/vault.py,sha256=CnhNu0pZfqS14kD1dQmBldITvTcSJHaHfk-KPNNDC7k,14471
|
462
462
|
reconcile/utils/vaultsecretref.py,sha256=VpqOrqobbrd_4rK-KdV9Esud6W1w8ZAUUN1xCjq8g5Q,932
|
463
463
|
reconcile/utils/glitchtip/__init__.py,sha256=FT6iBhGqoe7KExFdbgL8AYUb64iW_4snF5__Dcl7yt0,258
|
464
464
|
reconcile/utils/glitchtip/client.py,sha256=xra8V8R6p0NGISD5PWbl4uSIecoIm7xBqVTILkfRSh8,8454
|
@@ -514,8 +514,8 @@ tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y
|
|
514
514
|
tools/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
515
515
|
tools/test/test_qontract_cli.py,sha256=awwTHEc2DWlykuqGIYM0WOBoSL0KRnOraCLk3C7izis,1401
|
516
516
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
517
|
-
qontract_reconcile-0.9.
|
518
|
-
qontract_reconcile-0.9.
|
519
|
-
qontract_reconcile-0.9.
|
520
|
-
qontract_reconcile-0.9.
|
521
|
-
qontract_reconcile-0.9.
|
517
|
+
qontract_reconcile-0.9.1rc224.dist-info/METADATA,sha256=O_dU1aFg8s4UObH9oT92-vSuuHHWJyZvurbV4JkS8x4,2248
|
518
|
+
qontract_reconcile-0.9.1rc224.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
519
|
+
qontract_reconcile-0.9.1rc224.dist-info/entry_points.txt,sha256=3BPvsRryM1C4S_mb5kXmP5AVv-wJBzVCrOJyv6qUmc0,195
|
520
|
+
qontract_reconcile-0.9.1rc224.dist-info/top_level.txt,sha256=j0CHPIc8TsVRB50wOz_jhxjjaRyCJB3NOQeXhuHS67c,34
|
521
|
+
qontract_reconcile-0.9.1rc224.dist-info/RECORD,,
|
reconcile/cli.py
CHANGED
@@ -1693,7 +1693,7 @@ def terraform_cloudflare_resources(
|
|
1693
1693
|
@integration.command(short_help="Manage Cloudflare DNS using Terraform.")
|
1694
1694
|
@print_to_file
|
1695
1695
|
@enable_deletion(default=False)
|
1696
|
-
@threaded(default=
|
1696
|
+
@threaded(default=10)
|
1697
1697
|
@binary(["terraform"])
|
1698
1698
|
@binary_version("terraform", ["version"], TERRAFORM_VERSION_REGEX, TERRAFORM_VERSION)
|
1699
1699
|
@account_name
|
@@ -205,18 +205,14 @@ def get_cloudflare_provider_rps(
|
|
205
205
|
"""
|
206
206
|
Setting Cloudlare Terraform provider's RPS based on the size of the zone to improve performance of MR checks.
|
207
207
|
Specifically it was observed that 1000 records zone will result in around 250 seconds build time, and it become
|
208
|
-
problematic for MR merge throughput when exceeding 5 minutes. Therefore setting rps
|
209
|
-
save throttle quota, and
|
208
|
+
problematic for MR merge throughput when exceeding 5 minutes. Therefore setting rps lower for smaller zone to
|
209
|
+
save throttle quota, and higher for the large zones so MR checks won't take more than 250 seconds.
|
210
210
|
"""
|
211
211
|
|
212
212
|
if not records:
|
213
213
|
return DEFAULT_PROVIDER_RPS
|
214
214
|
size = len(records)
|
215
|
-
|
216
|
-
return 2
|
217
|
-
if size <= 1000:
|
218
|
-
return DEFAULT_PROVIDER_RPS
|
219
|
-
return 6
|
215
|
+
return min(-(-size // 50), DEFAULT_PROVIDER_RPS)
|
220
216
|
|
221
217
|
|
222
218
|
def create_backend_config(
|
reconcile/utils/sentry_client.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import functools
|
2
1
|
import json
|
2
|
+
from functools import lru_cache
|
3
3
|
|
4
4
|
import parse
|
5
5
|
import requests
|
@@ -12,6 +12,9 @@ class SentryClient: # pylint: disable=too-many-public-methods
|
|
12
12
|
def __init__(self, host, token):
|
13
13
|
self.host = host
|
14
14
|
self.auth_token = token
|
15
|
+
self.get_organizations = lru_cache()(self._get_organizations)
|
16
|
+
self.get_projects = lru_cache()(self._get_projects)
|
17
|
+
self.get_users = lru_cache()(self._get_users)
|
15
18
|
|
16
19
|
@retry()
|
17
20
|
def _do_sentry_api_call(self, method, path, slugs, payload=None):
|
@@ -58,8 +61,7 @@ class SentryClient: # pylint: disable=too-many-public-methods
|
|
58
61
|
return all_results
|
59
62
|
|
60
63
|
# Organization functions
|
61
|
-
|
62
|
-
def get_organizations(self):
|
64
|
+
def _get_organizations(self):
|
63
65
|
response = self._do_sentry_api_call("get", "organizations", [])
|
64
66
|
return response
|
65
67
|
|
@@ -68,8 +70,7 @@ class SentryClient: # pylint: disable=too-many-public-methods
|
|
68
70
|
return response
|
69
71
|
|
70
72
|
# Project functions
|
71
|
-
|
72
|
-
def get_projects(self):
|
73
|
+
def _get_projects(self):
|
73
74
|
response = self._do_sentry_api_call("get", "projects", [])
|
74
75
|
return response
|
75
76
|
|
@@ -275,8 +276,7 @@ class SentryClient: # pylint: disable=too-many-public-methods
|
|
275
276
|
return response
|
276
277
|
|
277
278
|
# User/Member functions
|
278
|
-
|
279
|
-
def get_users(self):
|
279
|
+
def _get_users(self):
|
280
280
|
response = self._do_sentry_api_call(
|
281
281
|
"get", "organizations", [self.ORGANIZATION, "members"]
|
282
282
|
)
|
reconcile/utils/vault.py
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
import base64
|
2
|
-
import functools
|
3
2
|
import logging
|
4
3
|
import os
|
5
4
|
import threading
|
6
5
|
import time
|
7
6
|
from collections.abc import Mapping
|
7
|
+
from functools import lru_cache
|
8
8
|
from typing import Optional
|
9
9
|
|
10
10
|
import hvac
|
@@ -93,6 +93,9 @@ class _VaultClient:
|
|
93
93
|
)
|
94
94
|
self.kube_auth_enabled = True
|
95
95
|
|
96
|
+
self._get_mount_version = lru_cache(maxsize=128)(self.__get_mount_version)
|
97
|
+
self._read_all_v2 = lru_cache(maxsize=2048)(self.__read_all_v2)
|
98
|
+
|
96
99
|
# This is a threaded world. Let's define a big
|
97
100
|
# connections pool to live in that world
|
98
101
|
# (this avoids the warning "Connection pool is
|
@@ -207,8 +210,7 @@ class _VaultClient:
|
|
207
210
|
mount_point = path_split[0]
|
208
211
|
return self._get_mount_version(mount_point)
|
209
212
|
|
210
|
-
|
211
|
-
def _get_mount_version(self, mount_point):
|
213
|
+
def __get_mount_version(self, mount_point):
|
212
214
|
try:
|
213
215
|
self._client.secrets.kv.v2.read_configuration(mount_point)
|
214
216
|
version = 2
|
@@ -217,8 +219,7 @@ class _VaultClient:
|
|
217
219
|
|
218
220
|
return version
|
219
221
|
|
220
|
-
|
221
|
-
def _read_all_v2(
|
222
|
+
def __read_all_v2(
|
222
223
|
self, path: str, version: Optional[str]
|
223
224
|
) -> tuple[dict, Optional[str]]:
|
224
225
|
path_split = path.split("/")
|
File without changes
|
{qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/entry_points.txt
RENAMED
File without changes
|
{qontract_reconcile-0.9.1rc222.dist-info → qontract_reconcile-0.9.1rc224.dist-info}/top_level.txt
RENAMED
File without changes
|