qontract-reconcile 0.10.1rc1076__py3-none-any.whl → 0.10.1rc1078__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.1rc1076
3
+ Version: 0.10.1rc1078
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
@@ -185,7 +185,7 @@ reconcile/dynatrace_token_provider/dependencies.py,sha256=FuRUnK18EyJIIgFwQBZSsk
185
185
  reconcile/dynatrace_token_provider/integration.py,sha256=Wgjv6UkMmPa8V0baHt0zk9sv5KENVeaStdIY1j7DKqE,26049
186
186
  reconcile/dynatrace_token_provider/metrics.py,sha256=oP-6NTZENFdvWiS0krnmX6tq3xyOzQ8e6vS0CZWYUuw,1496
187
187
  reconcile/dynatrace_token_provider/model.py,sha256=gkpqo5rRRueBXnIMjp4EEHqBUBuU65TRI8zpdb8GJ0A,241
188
- reconcile/dynatrace_token_provider/ocm.py,sha256=66XfJact_PZoa9c8Wz0t_n8N6aSMRQpfPLgKHYtWf8s,4307
188
+ reconcile/dynatrace_token_provider/ocm.py,sha256=MwYCZIxW4f-1jzFTxxN__sity6S8O7bbKUdyTFEVO7U,4325
189
189
  reconcile/dynatrace_token_provider/validate.py,sha256=40_9QmHoB3-KBc0k_0D4QO00PpNNPS-gU9Z6cIcWga8,1920
190
190
  reconcile/endpoints_discovery/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
191
191
  reconcile/endpoints_discovery/integration.py,sha256=q01DJgCv1YiDY-VUWDfQ5kfGm67BUhP-YP7c0JQObj8,12333
@@ -728,7 +728,7 @@ reconcile/utils/state.py,sha256=W0_awkLAPX18hNOF_60o73tkPxDUylqbzYNHfl_sDsk,1638
728
728
  reconcile/utils/structs.py,sha256=LcbLEg8WxfRqM6nW7NhcWN0YeqF7SQzxOgntmLs1SgY,352
729
729
  reconcile/utils/template.py,sha256=wTvRU4AnAV_o042tD4Mwls2dwWMuk7MKnde3MaCjaYg,331
730
730
  reconcile/utils/terraform_client.py,sha256=LjX2U2E0Dglt2S_KA5jWQ_dVC8sPn4FEAh0xW_d6JTk,35953
731
- reconcile/utils/terrascript_aws_client.py,sha256=SMsJaOmpn_9QQHhKIN_5ps1zOa9zEcBSsxGOyvF8voU,280492
731
+ reconcile/utils/terrascript_aws_client.py,sha256=YqMsqSJl5_P8kXPzcaWLAMxdIxhq1supwL94Xd5qPB4,281298
732
732
  reconcile/utils/three_way_diff_strategy.py,sha256=oQcHXd9LVhirJfoaOBoHUYuZVGfyL2voKr6KVI34zZE,4833
733
733
  reconcile/utils/throughput.py,sha256=iP4UWAe2LVhDo69mPPmgo9nQ7RxHD6_GS8MZe-aSiuM,344
734
734
  reconcile/utils/vault.py,sha256=9GSNHku8tw5KM2LKpZ1myWYDLtLGUJgpSnD0DxbzeO0,14956
@@ -870,8 +870,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
870
870
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
871
871
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
872
872
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
873
- qontract_reconcile-0.10.1rc1076.dist-info/METADATA,sha256=k_kWcvas6gsWAFAtBS_nKAJkH1agStlPxQ6sLq9nkdY,2213
874
- qontract_reconcile-0.10.1rc1076.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
- qontract_reconcile-0.10.1rc1076.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
- qontract_reconcile-0.10.1rc1076.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
- qontract_reconcile-0.10.1rc1076.dist-info/RECORD,,
873
+ qontract_reconcile-0.10.1rc1078.dist-info/METADATA,sha256=6w0z8xTpnfWVc8jLMi0muWmvSGpr38GScsoFqq8_pQQ,2213
874
+ qontract_reconcile-0.10.1rc1078.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
+ qontract_reconcile-0.10.1rc1078.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
+ qontract_reconcile-0.10.1rc1078.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
+ qontract_reconcile-0.10.1rc1078.dist-info/RECORD,,
@@ -34,8 +34,8 @@ from reconcile.utils.ocm_base_client import (
34
34
  Thin abstractions of reconcile.ocm module to reduce coupling.
35
35
  """
36
36
 
37
- DTP_LABEL = sre_capability_label_key("dtp", None)
38
37
  DTP_TENANT_LABEL = sre_capability_label_key("dtp", "tenant")
38
+ DTP_SPEC_LABEL = sre_capability_label_key("dtp", "token-spec")
39
39
  DTP_LABEL_SEARCH = sre_capability_label_key("dtp", "%")
40
40
 
41
41
 
@@ -50,7 +50,7 @@ class Cluster(BaseModel):
50
50
  @staticmethod
51
51
  def from_cluster_details(cluster: ClusterDetails) -> Cluster:
52
52
  dt_tenant = cluster.labels.get_label_value(DTP_TENANT_LABEL)
53
- token_spec_name = cluster.labels.get_label_value(DTP_LABEL)
53
+ token_spec_name = cluster.labels.get_label_value(DTP_SPEC_LABEL)
54
54
  if not token_spec_name:
55
55
  """
56
56
  We want to stay backwards compatible.
@@ -287,6 +287,10 @@ class OutputResourceNameNotUniqueException(Exception):
287
287
  )
288
288
 
289
289
 
290
+ class RDSParameterGroupValidationError(Exception):
291
+ pass
292
+
293
+
290
294
  class StateInaccessibleException(Exception):
291
295
  pass
292
296
 
@@ -1670,6 +1674,16 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1670
1674
  elif provider != provider_region:
1671
1675
  raise ValueError("region does not match availability zone")
1672
1676
 
1677
+ def validate_parameter_group(parameter_group: aws_db_parameter_group) -> None:
1678
+ parameter_group_name = parameter_group.get("name")
1679
+ for parameter in parameter_group.get("parameter", []):
1680
+ if parameter.get("name") == "rds.logical_replication":
1681
+ apply_method = parameter.get("apply_method")
1682
+ if apply_method != "pending-reboot":
1683
+ raise RDSParameterGroupValidationError(
1684
+ f"{parameter_group_name=} rds.logical_replication {apply_method=} must be set to 'pending-reboot'"
1685
+ )
1686
+
1673
1687
  def populate_parameter_group(name: str) -> aws_db_parameter_group:
1674
1688
  pg_values = self.get_values(name)
1675
1689
  # Parameter group name is not required by terraform.
@@ -1683,7 +1697,9 @@ class TerrascriptClient: # pylint: disable=too-many-public-methods
1683
1697
  pg_values["parameter"] = pg_values.pop("parameters")
1684
1698
  if self._multiregion_account(account) and len(provider) > 0:
1685
1699
  pg_values["provider"] = provider
1686
- return aws_db_parameter_group(pg_identifier, **pg_values)
1700
+ parameter_group = aws_db_parameter_group(pg_identifier, **pg_values)
1701
+ validate_parameter_group(parameter_group=parameter_group)
1702
+ return parameter_group
1687
1703
 
1688
1704
  # 'deps' should contain a list of terraform resource names
1689
1705
  # (not full objects) that must be created