qontract-reconcile 0.10.1rc1158__py3-none-any.whl → 0.10.1rc1160__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.1
2
2
  Name: qontract-reconcile
3
- Version: 0.10.1rc1158
3
+ Version: 0.10.1rc1160
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
@@ -94,7 +94,7 @@ reconcile/quay_mirror.py,sha256=mFp4Z5Nwl-DcFbbsJBOB8f9ldohFT-V67o868d5ux1s,1536
94
94
  reconcile/quay_mirror_org.py,sha256=utrJpJaKCs7U6WX6DODdfCeB0EmX-lUC8Y5fkmpgFSs,10764
95
95
  reconcile/quay_permissions.py,sha256=9KOutS1w4RFQqkvMSy54VtsKNx56-phzP6yI_rEW-B8,4244
96
96
  reconcile/quay_repos.py,sha256=cuEYG0HUe0ut5yvLdEwOF5-CmccpXQHRb_wDazvDrvQ,6895
97
- reconcile/queries.py,sha256=VaBYi8IU01Tjrncs_Ik0D4Q-cQvlinWFhH2_8cq5x7U,50812
97
+ reconcile/queries.py,sha256=04Xkm1wVg803ukZ_28Ud6AeiLJGVihl4f_UVoERv9uU,51509
98
98
  reconcile/query_validator.py,sha256=MSh5pKLBksws4AqfuvT8nrIGucIbqX-IOzYyPYTLO7k,1491
99
99
  reconcile/requests_sender.py,sha256=914iluuF4UVgG3VyxxtnHOu4yf6YKS2fIy6PViSsFTQ,3875
100
100
  reconcile/resource_scraper.py,sha256=znXCHrU7YwPfKuxGBiUrV7T1tYtn4vlz9qmZlfy6Flg,2307
@@ -727,7 +727,7 @@ reconcile/utils/state.py,sha256=W0_awkLAPX18hNOF_60o73tkPxDUylqbzYNHfl_sDsk,1638
727
727
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
728
728
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
729
729
  reconcile/utils/terraform_client.py,sha256=LjX2U2E0Dglt2S_KA5jWQ_dVC8sPn4FEAh0xW_d6JTk,35953
730
- reconcile/utils/terrascript_aws_client.py,sha256=aWaxp-lomSdlWz-yPvqAsaE-3W_jnxOIRvJuRXDGokY,283449
730
+ reconcile/utils/terrascript_aws_client.py,sha256=9-3mmZtiIrpu_uZrPPtSWgf-elbAG6jeureCUzkWQO4,283459
731
731
  reconcile/utils/three_way_diff_strategy.py,sha256=oQcHXd9LVhirJfoaOBoHUYuZVGfyL2voKr6KVI34zZE,4833
732
732
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
733
733
  reconcile/utils/vault.py,sha256=pi0PuyopvCq1gW0cldvy1-Ff6bqLUlCKC2MW0sifvSE,15043
@@ -880,8 +880,8 @@ tools/test/test_qontract_cli.py,sha256=iuzKbQ6ahinvjoQmQLBrG4shey0z-1rB6qCgS8T6d
880
880
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
881
881
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
882
882
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
883
- qontract_reconcile-0.10.1rc1158.dist-info/METADATA,sha256=eMmlXcbujY4OpUxnwP4jD3BuN2P3RGmQo-btlbDJT4k,2213
884
- qontract_reconcile-0.10.1rc1158.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
885
- qontract_reconcile-0.10.1rc1158.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
886
- qontract_reconcile-0.10.1rc1158.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
887
- qontract_reconcile-0.10.1rc1158.dist-info/RECORD,,
883
+ qontract_reconcile-0.10.1rc1160.dist-info/METADATA,sha256=THowdzoIl8cpUoUxhZFJbMrkvjWh_Ku8oSkayYf6ALY,2213
884
+ qontract_reconcile-0.10.1rc1160.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
885
+ qontract_reconcile-0.10.1rc1160.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
886
+ qontract_reconcile-0.10.1rc1160.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
887
+ qontract_reconcile-0.10.1rc1160.dist-info/RECORD,,
reconcile/queries.py CHANGED
@@ -2776,8 +2776,44 @@ TF_RESOURCES_PROVIDER_EXCLUSIONS_BY_PROVISIONER = """
2776
2776
  """
2777
2777
 
2778
2778
 
2779
- def get_tf_resources_provider_exclusions_by_provisioner():
2779
+ def get_tf_resources_provider_exclusions_by_provisioner() -> (
2780
+ list[dict[str, Any]] | None
2781
+ ):
2780
2782
  gqlapi = gql.get_api()
2781
- return gqlapi.query(TF_RESOURCES_PROVIDER_EXCLUSIONS_BY_PROVISIONER)[
2783
+ settings = gqlapi.query(TF_RESOURCES_PROVIDER_EXCLUSIONS_BY_PROVISIONER)[
2782
2784
  "tf_provider_exclusions_by_provisioner"
2783
2785
  ]
2786
+ if (
2787
+ len(settings) == 1
2788
+ and "terraformResourcesProviderExclusionsByProvisioner" in settings[0]
2789
+ ):
2790
+ return settings[0]["terraformResourcesProviderExclusionsByProvisioner"]
2791
+ return None
2792
+
2793
+
2794
+ SCHEMAS_QUERY = """
2795
+ {
2796
+ schemas: __schema {
2797
+ types {
2798
+ name
2799
+ fields {
2800
+ name
2801
+ type {
2802
+ kind
2803
+ name
2804
+ ofType {
2805
+ kind
2806
+ name
2807
+ }
2808
+ }
2809
+ }
2810
+ }
2811
+ }
2812
+ }
2813
+ """
2814
+
2815
+
2816
+ # TODO: replace with typed query following https://issues.redhat.com/browse/APPSRE-10983
2817
+ def get_schemas() -> dict:
2818
+ gqlapi = gql.get_api()
2819
+ return gqlapi.query(SCHEMAS_QUERY)["schemas"]
@@ -1586,14 +1586,14 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1586
1586
  self.resource_spec_inventory: ExternalResourceSpecInventory = {}
1587
1587
 
1588
1588
  # Ensure provider exclusions are fetched
1589
- if not provider_exclusions_by_provisioner:
1589
+ if provider_exclusions_by_provisioner is None:
1590
1590
  provider_exclusions_by_provisioner = (
1591
1591
  queries.get_tf_resources_provider_exclusions_by_provisioner() or []
1592
1592
  )
1593
1593
 
1594
1594
  provider_exclusions_by_provisioner_name = {
1595
1595
  p["provisioner"]["name"]: p["excludedProviders"]
1596
- for p in provider_exclusions_by_provisioner
1596
+ for p in provider_exclusions_by_provisioner or []
1597
1597
  }
1598
1598
 
1599
1599
  for namespace_info in namespaces: