qontract-reconcile 0.10.1rc911__py3-none-any.whl → 0.10.1rc913__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.1rc911
3
+ Version: 0.10.1rc913
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
@@ -113,7 +113,7 @@ reconcile/terraform_cloudflare_dns.py,sha256=NfgUqXL218D9pW6sprtUAJQlMzFHa2FXKp_
113
113
  reconcile/terraform_cloudflare_resources.py,sha256=41Mj1WkuS75slCDpmhG2GGf1nh3BwfxcdNC73-PNadc,15000
114
114
  reconcile/terraform_cloudflare_users.py,sha256=AzIhQwnJtsUh7GlZpvJE0um-_7Q6zYRxzUVJYoSU3dY,13943
115
115
  reconcile/terraform_repo.py,sha256=D6JFKLLJbsMHcIG3--oUNeuQteXqT6E5tJ18qzb9YXM,16218
116
- reconcile/terraform_resources.py,sha256=P2_S0TqkRp4VYf9yoJxt52YFgHJOMqfUYe1GwLzBc7M,19288
116
+ reconcile/terraform_resources.py,sha256=HmTrDTpPbWOvvyPdEM7bXbLPsTS8Tcg1mPu8nZTvAlE,19288
117
117
  reconcile/terraform_tgw_attachments.py,sha256=dhtqrckfB3CN90PnrKAepPFRzFB0Ecoh1vk3IkpZ2uE,18657
118
118
  reconcile/terraform_users.py,sha256=HqSm3ev3b8dZ9J6F_phDZB-FQsnlsdeKp9RPoY1cU94,10188
119
119
  reconcile/terraform_vpc_peerings.py,sha256=WhGvDHwllM36yTJPE5EzQ1Z0Oc-tT9ksXbBn5cpFBBg,27676
@@ -464,7 +464,7 @@ reconcile/templates/rosa-classic-cluster-creation.sh.j2,sha256=FVBmnR2FmVModhqOY
464
464
  reconcile/templates/rosa-hcp-cluster-creation.sh.j2,sha256=2wTdv9qvapCvT8NSi_hq8sXhpFSaxRX-V6Cao1diCI8,2393
465
465
  reconcile/templating/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
466
466
  reconcile/templating/renderer.py,sha256=VQVsQxMjKfftpsgzpd1jJ-bhrsgi8zjDYXYzMfI4vZA,12104
467
- reconcile/templating/validator.py,sha256=L_5kvY1LJTNQUmhPZZoB62NBiTKFIjlia0j6jZGdvh8,4660
467
+ reconcile/templating/validator.py,sha256=tGI7PwPMAmRJ_-Gg_O7NoZO8ytg_QUeCQAv6G1smitc,4736
468
468
  reconcile/templating/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
469
469
  reconcile/templating/lib/merge_request_manager.py,sha256=4oe3EwQOP7CZSraocivbRzzOuVb0ooElaUS2_DGsF50,5603
470
470
  reconcile/templating/lib/model.py,sha256=fb6FYYLQjmoh2DjVKO7TEWCuDPf1Q34xmOx0M9Z07ek,324
@@ -705,7 +705,7 @@ reconcile/utils/sqs_gateway.py,sha256=RiIfkBuGC15Q2178caG1_5hg53gY6QdRL1tWbK3FOM
705
705
  reconcile/utils/state.py,sha256=sJbfxvSTnHlHfgQRc_vRz-U_9NnVFGq-W8DX3ZHkfeY,16352
706
706
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
707
707
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
708
- reconcile/utils/terraform_client.py,sha256=zbx5Ng2Xm7P93qqvFCbR-2FFYUTlmZbLGYNWvpkDtzE,32400
708
+ reconcile/utils/terraform_client.py,sha256=hyMtNVBuDHbqQNSsdG5kTIvJRyOt23tFuWAspPf_Lqo,32161
709
709
  reconcile/utils/terrascript_aws_client.py,sha256=kU--Qk42v7OXbOtBEBhgRPRdSiFcfXOvMS6stHs0r_o,276712
710
710
  reconcile/utils/three_way_diff_strategy.py,sha256=OniTnogBkdgy_7Xg51N1MgjS-Qtk8uM1ccjWaiXxiV8,4895
711
711
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
@@ -844,8 +844,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
844
844
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
845
845
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
846
846
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
847
- qontract_reconcile-0.10.1rc911.dist-info/METADATA,sha256=zZqEzan0ir-yqlWaKhNwX7vcukqD6Q2flNVLCZtUjKA,2273
848
- qontract_reconcile-0.10.1rc911.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
- qontract_reconcile-0.10.1rc911.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
- qontract_reconcile-0.10.1rc911.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
- qontract_reconcile-0.10.1rc911.dist-info/RECORD,,
847
+ qontract_reconcile-0.10.1rc913.dist-info/METADATA,sha256=_Z85T5zVc8ot621q16JjZ2OTEpfrUsmf3g_bCxtz_l0,2273
848
+ qontract_reconcile-0.10.1rc913.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
+ qontract_reconcile-0.10.1rc913.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
+ qontract_reconcile-0.10.1rc913.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
+ qontract_reconcile-0.10.1rc913.dist-info/RECORD,,
@@ -79,15 +79,17 @@ class TemplateValidatorIntegration(QontractReconcileIntegration):
79
79
 
80
80
  # Check condition
81
81
  should_render = r.render_condition()
82
- if (
83
- template_test.expected_to_render is not None
84
- and template_test.expected_to_render != should_render
85
- ):
82
+ expected_to_render = (
83
+ template_test.expected_to_render
84
+ if template_test.expected_to_render is not None
85
+ else True
86
+ )
87
+ if expected_to_render != should_render:
86
88
  diffs.append(
87
89
  TemplateDiff(
88
90
  template=template.name,
89
91
  test=template_test.name,
90
- diff=f"Condition mismatch, got: {should_render}, expected: {template_test.expected_to_render}",
92
+ diff=f"Condition mismatch for expectedToRender, got: {should_render}, expected: {expected_to_render}",
91
93
  )
92
94
  )
93
95
 
@@ -66,7 +66,7 @@ from reconcile.utils.vault import (
66
66
  )
67
67
 
68
68
  QONTRACT_INTEGRATION = "terraform_resources"
69
- QONTRACT_INTEGRATION_VERSION = make_semver(0, 5, 3)
69
+ QONTRACT_INTEGRATION_VERSION = make_semver(0, 5, 4)
70
70
  QONTRACT_TF_PREFIX = "qrtf"
71
71
 
72
72
 
@@ -757,7 +757,6 @@ class TerraformClient: # pylint: disable=too-many-public-methods
757
757
  if after_version == before_version:
758
758
  return
759
759
 
760
- allow_major_version_upgrade = after.get("allow_major_version_upgrade", False)
761
760
  region_name = get_region_from_availability_zone(before["availability_zone"])
762
761
  if self._aws_api is not None:
763
762
  valid_upgrade_target = self._aws_api.get_db_valid_upgrade_target(
@@ -765,13 +764,10 @@ class TerraformClient: # pylint: disable=too-many-public-methods
765
764
  )
766
765
  if not valid_upgrade_target:
767
766
  # valid_upgrade_target can be empty when current version is no longer supported by AWS.
768
- # In this case, we can't validate it, so treat it as major version upgrade for safety.
769
- # Skip validation if allow_major_version_upgrade is enabled.
770
- if not allow_major_version_upgrade:
771
- raise ValueError(
772
- "allow_major_version_upgrade is not enabled for upgrading RDS instance: "
773
- f"{resource_name} to a new version when there is no valid upgrade target available."
774
- )
767
+ # In this case, we can't validate it, so skip.
768
+ logging.warning(
769
+ f"No valid upgrade target available, skip validation for {resource_name}."
770
+ )
775
771
  return
776
772
  target = next(
777
773
  (
@@ -786,6 +782,10 @@ class TerraformClient: # pylint: disable=too-many-public-methods
786
782
  f"Cannot upgrade RDS instance: {resource_name} "
787
783
  f"from {before_version} to {after_version}"
788
784
  )
785
+ allow_major_version_upgrade = after.get(
786
+ "allow_major_version_upgrade",
787
+ False,
788
+ )
789
789
  if target["IsMajorVersionUpgrade"] and not allow_major_version_upgrade:
790
790
  raise ValueError(
791
791
  "allow_major_version_upgrade is not enabled for upgrading RDS instance: "