qontract-reconcile 0.10.1rc883__py3-none-any.whl → 0.10.1rc884__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.1rc883
3
+ Version: 0.10.1rc884
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
@@ -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=hQX5JWrC-MSwICs4FMJ_pbTa5eTQP6VrmE58z_XYclg,8204
475
+ reconcile/terraform_vpc_resources/integration.py,sha256=evBNlUo5KwXoY3az7rOKaV3d7W578wRU2N98zJrKXYI,8209
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
@@ -702,7 +702,7 @@ reconcile/utils/sqs_gateway.py,sha256=gFl9DM4DmGnptuxTOe4lS3YTyE80eSAvK42ljS8h4d
702
702
  reconcile/utils/state.py,sha256=DRxzuOw3Iha-b2esBMjZTZ5K-OxfrGbkyEvpTT5xHTs,16369
703
703
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
704
704
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
705
- reconcile/utils/terraform_client.py,sha256=mZEKpu6nbfiQd60wRkc8-5sljBTUTOgaAKnF89itMzU,32085
705
+ reconcile/utils/terraform_client.py,sha256=XYtCz4af3BvJ6loDheOzDE6d4IZXOMFr4LCf2jqx3EU,32481
706
706
  reconcile/utils/terrascript_aws_client.py,sha256=msKley24-PiYt3lsPUNzKh2tpMj4MpGjF7lXFr0sBM0,276187
707
707
  reconcile/utils/three_way_diff_strategy.py,sha256=OniTnogBkdgy_7Xg51N1MgjS-Qtk8uM1ccjWaiXxiV8,4895
708
708
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
@@ -838,8 +838,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
838
838
  tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jrss,4941
839
839
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
840
840
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
841
- qontract_reconcile-0.10.1rc883.dist-info/METADATA,sha256=AKEYLPW_CulRDgZJEvwVpBQkIh4k2QvbPHq-QYXjQv4,2273
842
- qontract_reconcile-0.10.1rc883.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
843
- qontract_reconcile-0.10.1rc883.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
844
- qontract_reconcile-0.10.1rc883.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
845
- qontract_reconcile-0.10.1rc883.dist-info/RECORD,,
841
+ qontract_reconcile-0.10.1rc884.dist-info/METADATA,sha256=9uV_JpZyviuoBDMGVALW8Dggyct-WRRrS6pEGcGUD00,2273
842
+ qontract_reconcile-0.10.1rc884.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
843
+ qontract_reconcile-0.10.1rc884.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
844
+ qontract_reconcile-0.10.1rc884.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
845
+ qontract_reconcile-0.10.1rc884.dist-info/RECORD,,
@@ -164,7 +164,7 @@ class TerraformVpcResources(QontractReconcileIntegration[TerraformVpcResourcesPa
164
164
  thread_pool_size=thread_pool_size,
165
165
  )
166
166
 
167
- tf_client.plan(enable_deletion=enable_deletion)
167
+ tf_client.safe_plan(enable_deletion=enable_deletion)
168
168
 
169
169
  if dry_run:
170
170
  sys.exit(ExitCodes.SUCCESS)
@@ -209,6 +209,15 @@ class TerraformClient: # pylint: disable=too-many-public-methods
209
209
  self.created_users.extend(created_users)
210
210
  return disabled_deletions_detected, errors
211
211
 
212
+ def safe_plan(self, enable_deletion: bool) -> None:
213
+ """Raises exception if errors are detected at plan step"""
214
+ disable_deletions_detected, errors = self.plan(enable_deletion)
215
+
216
+ if errors:
217
+ raise RuntimeError("Terraform plan has errors")
218
+ if disable_deletions_detected:
219
+ raise RuntimeError("Terraform plan has disabled deletions detected")
220
+
212
221
  @retry()
213
222
  def terraform_plan(
214
223
  self, spec: TerraformSpec, enable_deletion: bool