qontract-reconcile 0.10.2.dev308__py3-none-any.whl → 0.10.2.dev309__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qontract-reconcile
3
- Version: 0.10.2.dev308
3
+ Version: 0.10.2.dev309
4
4
  Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
5
5
  Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
6
6
  Project-URL: repository, https://github.com/app-sre/qontract-reconcile
@@ -109,9 +109,9 @@ reconcile/terraform_cloudflare_resources.py,sha256=tK-BxQeNdZjf59deKd51Roz868e7U
109
109
  reconcile/terraform_cloudflare_users.py,sha256=mlSYNktRetBvw8mi2TUSdKSZw0aQ821VeU6OQ1WcV3U,13516
110
110
  reconcile/terraform_repo.py,sha256=vVJfaCV9775FGMMTHfoobaPetSlJMiQ4arNudL2pvh8,15607
111
111
  reconcile/terraform_resources.py,sha256=AXO3_Ehcg3I6ao7qiKzXC4Mk6BqwMoNooXU50c2zSTA,19555
112
- reconcile/terraform_tgw_attachments.py,sha256=uls0GlTVeSMTZtUGXpqDW8ovKqXV-6036AhmxYOmFbM,18923
113
- reconcile/terraform_users.py,sha256=F-OgRfVV6_MoSvL0oZBtbFtNVS4V48baOWN157IoGEE,10321
114
- reconcile/terraform_vpc_peerings.py,sha256=v1GPiluuPLwpQWrp1j5xT9_QuQw07F_Lj2uL3RX9PZE,27788
112
+ reconcile/terraform_tgw_attachments.py,sha256=4cUuM0cfTY6Hy2NnLgzavo7URnblOtgsgV9pSpNOadQ,18936
113
+ reconcile/terraform_users.py,sha256=qcgI2VF6Gak_IwncOUSzqLvajSu4Q4ltKnuFIfttjhQ,10373
114
+ reconcile/terraform_vpc_peerings.py,sha256=rMotDHy3Fd5QTxrOGjCJ3f2vICk3fmxrKYVCIU8p_y4,27787
115
115
  reconcile/vault_replication.py,sha256=trtbB-jDwca822J5I_s0zlwFtlyaiAtqgbPeqp7Cggc,17714
116
116
  reconcile/vpc_peerings_validator.py,sha256=_77eu6DSy6VjTE5mhV-sOIVOGIiBvDEEDCdwwRdrgVQ,7101
117
117
  reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -657,8 +657,8 @@ reconcile/utils/smtp_client.py,sha256=0xefB4I9E5eBB-FlxFJYjvz3Kvuqi_K3Ma_Wk0NAQK
657
657
  reconcile/utils/sqs_gateway.py,sha256=XNIf3PY4UCPNufP2Ul0UJj3fKlt5larBba-VTT-41Fg,2265
658
658
  reconcile/utils/state.py,sha256=vCHYIfrWLfPyIWEHSaADWlc4OqhwcOiqM3Egqvw-lfo,16372
659
659
  reconcile/utils/structs.py,sha256=P57POzpEntu8ZoZDnsOdni9qUuBDWknmw0iinznxXoY,386
660
- reconcile/utils/terraform_client.py,sha256=GoLbfs4d4YItNCeV3NZnrth4sD8ziNYgY2IszruRDpg,37303
661
- reconcile/utils/terrascript_aws_client.py,sha256=o5-K61gEbQN48IRfdHVDfgt0sW-sYN9WYho4ZZ7j7io,295917
660
+ reconcile/utils/terraform_client.py,sha256=VP5Bd9Eto-To45TV08SmhhXTB3j-i2Ld3Nnvh2tkcjw,37393
661
+ reconcile/utils/terrascript_aws_client.py,sha256=X47Wm8NIfbZQFHNKqEPpJtrAYnmC2K4wF3PVkB2NAdA,301567
662
662
  reconcile/utils/three_way_diff_strategy.py,sha256=oQcHXd9LVhirJfoaOBoHUYuZVGfyL2voKr6KVI34zZE,4833
663
663
  reconcile/utils/throughput.py,sha256=KNDCVsCLSp89V4pO3sEUd7bJUuh6gNfsxsc_18rEv_Y,357
664
664
  reconcile/utils/vault.py,sha256=6V15LByFghp-U3k0N4lum6V7qt2EAlRfcAxjy5e-FAU,15146
@@ -796,7 +796,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
796
796
  tools/saas_promotion_state/saas_promotion_state.py,sha256=uQv2QJAmUXP1g2GPIH30WTlvL9soY6m9lefpZEVDM5w,3965
797
797
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
798
798
  tools/sre_checkpoints/util.py,sha256=KcYVfa3UmJHVP_ocgrKe8NkrO5IDB9aWEDydSokPcRk,975
799
- qontract_reconcile-0.10.2.dev308.dist-info/METADATA,sha256=ZD-9CrY2y9ZCq1K7sCAHPwzqk9JVqsB5i9-yrbi3ud8,24916
800
- qontract_reconcile-0.10.2.dev308.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
801
- qontract_reconcile-0.10.2.dev308.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
802
- qontract_reconcile-0.10.2.dev308.dist-info/RECORD,,
799
+ qontract_reconcile-0.10.2.dev309.dist-info/METADATA,sha256=oljRyu6KOJLH95sGlo3Hej6hD_TWUcIgOP1KIbf3n-w,24916
800
+ qontract_reconcile-0.10.2.dev309.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
801
+ qontract_reconcile-0.10.2.dev309.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
802
+ qontract_reconcile-0.10.2.dev309.dist-info/RECORD,,
@@ -93,7 +93,7 @@ class Accepter(BaseModel):
93
93
  region: str
94
94
  vpc_id: str | None
95
95
  route_table_ids: list[str] | None
96
- subnets_id_az: list[dict] | None
96
+ subnets_id_az: list[dict[str, str]] | None
97
97
  account: ClusterAccountProviderInfo
98
98
  api_security_group_id: str | None
99
99
 
@@ -342,7 +342,7 @@ def _populate_tgw_attachments_working_dirs(
342
342
  ts: Terrascript,
343
343
  desired_state: Iterable[DesiredStateItem],
344
344
  print_to_file: str | None,
345
- ) -> dict[str, str]:
345
+ ) -> Mapping[str, str]:
346
346
  accounts_by_infra_account_name: dict[str, list[dict[str, Any]]] = {}
347
347
  for item in desired_state:
348
348
  accounts_by_infra_account_name.setdefault(item.infra_acount_name, []).append(
@@ -1,4 +1,5 @@
1
1
  import sys
2
+ from collections.abc import Mapping
2
3
  from textwrap import indent
3
4
  from typing import (
4
5
  Any,
@@ -81,8 +82,10 @@ QONTRACT_INTEGRATION = "terraform_users"
81
82
  QONTRACT_INTEGRATION_VERSION = make_semver(0, 4, 2)
82
83
  QONTRACT_TF_PREFIX = "qrtf"
83
84
 
85
+ Role = dict[str, Any]
84
86
 
85
- def get_tf_roles() -> list[dict[str, Any]]:
87
+
88
+ def get_tf_roles() -> list[Role]:
86
89
  gqlapi = gql.get_api()
87
90
  roles: list[dict] = expiration.filter(gqlapi.query(TF_QUERY)["roles"])
88
91
  return [
@@ -114,7 +117,7 @@ def setup(
114
117
  skip_reencrypt_accounts: list[str],
115
118
  appsre_pgp_key: str | None = None,
116
119
  account_name: str | None = None,
117
- ) -> tuple[list[dict[str, Any]], dict[str, str], bool, AWSApi]:
120
+ ) -> tuple[list[dict[str, Any]], Mapping[str, str], bool, AWSApi]:
118
121
  accounts = [
119
122
  a
120
123
  for a in queries.get_aws_accounts(terraform_state=True)
@@ -565,7 +565,7 @@ def build_desired_state_vpc(
565
565
  @defer
566
566
  def run(
567
567
  dry_run: bool,
568
- print_to_file: bool | None = None,
568
+ print_to_file: str | None = None,
569
569
  enable_deletion: bool = False,
570
570
  thread_pool_size: int = DEFAULT_THREAD_POOL_SIZE,
571
571
  account_name: str | None = None,
@@ -194,17 +194,17 @@ class TerraformClient:
194
194
  return spec.name, json.loads(stdout)
195
195
 
196
196
  # terraform plan
197
- def plan(self, enable_deletion):
197
+ def plan(self, enable_deletion: bool) -> tuple[bool, bool]:
198
198
  errors = False
199
199
  disabled_deletions_detected = False
200
- results = threaded.run(
200
+ results: list[tuple[bool, list[AccountUser], bool]] = threaded.run(
201
201
  self.terraform_plan,
202
202
  self.specs,
203
203
  self.thread_pool_size,
204
204
  enable_deletion=enable_deletion,
205
205
  )
206
206
 
207
- self.created_users = []
207
+ self.created_users: list[AccountUser] = []
208
208
  for disabled_deletion_detected, created_users, error in results:
209
209
  if error:
210
210
  errors = True