qontract-reconcile 0.10.2.dev206__py3-none-any.whl → 0.10.2.dev208__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.dev206
3
+ Version: 0.10.2.dev208
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
@@ -118,7 +118,7 @@ reconcile/terraform_resources.py,sha256=iufjMJs_aSEvmh7Cg11beCxKmV8nrOLOpEtiTryP
118
118
  reconcile/terraform_tgw_attachments.py,sha256=hn_IO-0W_QoDufW6aZRqcruZ7MPGjaLuc0PZ-FApJQA,18810
119
119
  reconcile/terraform_users.py,sha256=rt62m9Yb0mkyhza07t_c6vlrFWF-OeJGJ9oGaCVK72M,10234
120
120
  reconcile/terraform_vpc_peerings.py,sha256=0N7uxG6Afe2oNrUyw-apjV-fX2P9TbI5A3xjXO_83eA,27658
121
- reconcile/vault_replication.py,sha256=YD70ROZXC1dYnUcS3q1WgnAoIDSdoZVdZsUGc5fanNU,17556
121
+ reconcile/vault_replication.py,sha256=2ARkleRg7WE-tNuTadyge8ljZv3wk4gsJFkKEHHksXM,17627
122
122
  reconcile/vpc_peerings_validator.py,sha256=aESqrhm1tpkc2iqSL1UV5to_HjNgjRSffD0crb_q49g,7113
123
123
  reconcile/aus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
124
  reconcile/aus/advanced_upgrade_service.py,sha256=lt684trHbKvVDLwwuNVz3Wu_MnytFSbS_7MZTIITh9k,23969
@@ -141,7 +141,7 @@ reconcile/aus/version_gates/ocp_gate_handler.py,sha256=RW1ppDaCZXVegV9AzzqYXxDUu
141
141
  reconcile/aus/version_gates/sts_version_gate_handler.py,sha256=swwwz0YyvrEBf_InqrRRBCt2QzHYNvvq8jz9aYwElh4,3663
142
142
  reconcile/automated_actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
143
143
  reconcile/automated_actions/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
- reconcile/automated_actions/config/integration.py,sha256=gDNUKxs8m_4GWH0GnW9QXubtsBF6idc0kHxo05hdj0U,11633
144
+ reconcile/automated_actions/config/integration.py,sha256=y4Ce_sgCx50lZQNvfkcnuyrDP4VPC1Dvq5-eBU8uibM,12248
145
145
  reconcile/aws_account_manager/README.md,sha256=_XFM3GZNHUzv--e_navqJuaUWpjC6QrHfulreHynFf0,262
146
146
  reconcile/aws_account_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
147
147
  reconcile/aws_account_manager/integration.py,sha256=XTamC824imAezzVoQhhwdMOawNcPCOghR_y7i_8bpJI,15343
@@ -227,7 +227,7 @@ reconcile/glitchtip_project_alerts/integration.py,sha256=d3PMy-mQSbSZdIGAVaZCA2U
227
227
  reconcile/glitchtip_project_dsn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
228
  reconcile/glitchtip_project_dsn/integration.py,sha256=2iugub-kHYkHNK33n0v9_TeWonuxCPah_VkoTPvaajE,8077
229
229
  reconcile/gql_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
- reconcile/gql_definitions/introspection.json,sha256=Oo__Q1ENvfRSNRcJbojqqWyICHq5mSE_ebhJGqtKCsw,2335890
230
+ reconcile/gql_definitions/introspection.json,sha256=98cLVDNRRqTIu5ONbfa0WqIptS3J7g-s4M2Dhq3oSo4,2345500
231
231
  reconcile/gql_definitions/acs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
232
232
  reconcile/gql_definitions/acs/acs_instances.py,sha256=L91WW9LbhJbBSrECqShQpFtjoBOsmNIYLRpMbx1io5o,2181
233
233
  reconcile/gql_definitions/acs/acs_policies.py,sha256=Ygpfl2-VkYLSlJvHgp_dJBfb66K_Rwfdfpsa18w1v1s,4338
@@ -241,7 +241,7 @@ reconcile/gql_definitions/app_sre_tekton_access_revalidation/__init__.py,sha256=
241
241
  reconcile/gql_definitions/app_sre_tekton_access_revalidation/roles.py,sha256=8Y4NsS5T7tumDWxY5MuoV50MK2i-DsLYSpCRjb7KaLE,2353
242
242
  reconcile/gql_definitions/app_sre_tekton_access_revalidation/users.py,sha256=XdVxBxiyTR6Cy939EHNw__0k7iWrZWlhrgS5DakST0I,2504
243
243
  reconcile/gql_definitions/automated_actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
244
- reconcile/gql_definitions/automated_actions/instance.py,sha256=73vRFDvrD9t2cY1Y8jmjfVPNJ_osPrI8fHTAQz0CGv4,6105
244
+ reconcile/gql_definitions/automated_actions/instance.py,sha256=A2cTd13049HVSU7-AOOFpbpIoDkawEjCaHUsE3CoQGs,7478
245
245
  reconcile/gql_definitions/aws_account_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
246
246
  reconcile/gql_definitions/aws_account_manager/aws_accounts.py,sha256=vF51KrY2gwX0J9vESiaRMPQqdAMEtz9f_tBq52bInp0,5148
247
247
  reconcile/gql_definitions/aws_ami_cleanup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -815,7 +815,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
815
815
  tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
816
816
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
817
817
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
818
- qontract_reconcile-0.10.2.dev206.dist-info/METADATA,sha256=zOwPXiy61ZEizyYOaozdJ2Pp9IWFIAAUG3nzGRDetTo,24555
819
- qontract_reconcile-0.10.2.dev206.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
820
- qontract_reconcile-0.10.2.dev206.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
821
- qontract_reconcile-0.10.2.dev206.dist-info/RECORD,,
818
+ qontract_reconcile-0.10.2.dev208.dist-info/METADATA,sha256=aHM0xspqvI1keKkT4Wm4ydHb1j9QL-QknaweeU7D6L0,24555
819
+ qontract_reconcile-0.10.2.dev208.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
820
+ qontract_reconcile-0.10.2.dev208.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
821
+ qontract_reconcile-0.10.2.dev208.dist-info/RECORD,,
@@ -17,10 +17,12 @@ from pydantic import BaseModel
17
17
  import reconcile.openshift_base as ob
18
18
  from reconcile.gql_definitions.automated_actions.instance import (
19
19
  AutomatedActionActionListV1,
20
+ AutomatedActionExternalResourceRdsRebootV1,
20
21
  AutomatedActionOpenshiftWorkloadRestartArgumentV1,
21
22
  AutomatedActionOpenshiftWorkloadRestartV1,
22
23
  AutomatedActionsInstanceV1,
23
24
  AutomatedActionV1,
25
+ AWSAccountV1,
24
26
  )
25
27
  from reconcile.gql_definitions.automated_actions.instance import query as instance_query
26
28
  from reconcile.utils import expiration, gql
@@ -165,6 +167,15 @@ class AutomatedActionsConfigIntegration(
165
167
  arg.dict(exclude_none=True, exclude_defaults=True)
166
168
  for arg in action.action_list_arguments or []
167
169
  )
170
+ case AutomatedActionExternalResourceRdsRebootV1():
171
+ for arg in action.external_resource_rds_reboot_arguments:
172
+ for er in arg.namespace.external_resources or []:
173
+ if not isinstance(er.provisioner, AWSAccountV1):
174
+ continue
175
+ parameters.append({
176
+ "account": f"^{er.provisioner.name}$",
177
+ "identifier": arg.identifier,
178
+ })
168
179
  case AutomatedActionOpenshiftWorkloadRestartV1():
169
180
  parameters.extend(
170
181
  {
@@ -84,6 +84,26 @@ query AutomatedActionsInstances {
84
84
  }
85
85
  }
86
86
  maxOps
87
+ ... on AutomatedActionActionList_v1 {
88
+ action_list_arguments: arguments {
89
+ action_user
90
+ max_age_minutes
91
+ }
92
+ }
93
+ ... on AutomatedActionExternalResourceRdsReboot_v1 {
94
+ external_resource_rds_reboot_arguments: arguments {
95
+ namespace {
96
+ externalResources {
97
+ provisioner {
98
+ ... on AWSAccount_v1 {
99
+ name
100
+ }
101
+ }
102
+ }
103
+ }
104
+ identifier
105
+ }
106
+ }
87
107
  ... on AutomatedActionOpenshiftWorkloadRestart_v1 {
88
108
  openshift_workload_restart_arguments: arguments {
89
109
  namespace {
@@ -100,12 +120,6 @@ query AutomatedActionsInstances {
100
120
  name
101
121
  }
102
122
  }
103
- ... on AutomatedActionActionList_v1 {
104
- action_list_arguments: arguments {
105
- action_user
106
- max_age_minutes
107
- }
108
- }
109
123
  }
110
124
  }
111
125
  }
@@ -150,6 +164,40 @@ class AutomatedActionV1(ConfiguredBaseModel):
150
164
  max_ops: int = Field(..., alias="maxOps")
151
165
 
152
166
 
167
+ class AutomatedActionActionListArgumentV1(ConfiguredBaseModel):
168
+ action_user: Optional[str] = Field(..., alias="action_user")
169
+ max_age_minutes: Optional[int] = Field(..., alias="max_age_minutes")
170
+
171
+
172
+ class AutomatedActionActionListV1(AutomatedActionV1):
173
+ action_list_arguments: Optional[list[AutomatedActionActionListArgumentV1]] = Field(..., alias="action_list_arguments")
174
+
175
+
176
+ class ExternalResourcesProvisionerV1(ConfiguredBaseModel):
177
+ ...
178
+
179
+
180
+ class AWSAccountV1(ExternalResourcesProvisionerV1):
181
+ name: str = Field(..., alias="name")
182
+
183
+
184
+ class NamespaceExternalResourceV1(ConfiguredBaseModel):
185
+ provisioner: Union[AWSAccountV1, ExternalResourcesProvisionerV1] = Field(..., alias="provisioner")
186
+
187
+
188
+ class AutomatedActionExternalResourceArgumentV1_NamespaceV1(ConfiguredBaseModel):
189
+ external_resources: Optional[list[NamespaceExternalResourceV1]] = Field(..., alias="externalResources")
190
+
191
+
192
+ class AutomatedActionExternalResourceArgumentV1(ConfiguredBaseModel):
193
+ namespace: AutomatedActionExternalResourceArgumentV1_NamespaceV1 = Field(..., alias="namespace")
194
+ identifier: str = Field(..., alias="identifier")
195
+
196
+
197
+ class AutomatedActionExternalResourceRdsRebootV1(AutomatedActionV1):
198
+ external_resource_rds_reboot_arguments: list[AutomatedActionExternalResourceArgumentV1] = Field(..., alias="external_resource_rds_reboot_arguments")
199
+
200
+
153
201
  class DisableClusterAutomationsV1(ConfiguredBaseModel):
154
202
  integrations: Optional[list[str]] = Field(..., alias="integrations")
155
203
 
@@ -175,19 +223,10 @@ class AutomatedActionOpenshiftWorkloadRestartV1(AutomatedActionV1):
175
223
  openshift_workload_restart_arguments: list[AutomatedActionOpenshiftWorkloadRestartArgumentV1] = Field(..., alias="openshift_workload_restart_arguments")
176
224
 
177
225
 
178
- class AutomatedActionActionListArgumentV1(ConfiguredBaseModel):
179
- action_user: Optional[str] = Field(..., alias="action_user")
180
- max_age_minutes: Optional[int] = Field(..., alias="max_age_minutes")
181
-
182
-
183
- class AutomatedActionActionListV1(AutomatedActionV1):
184
- action_list_arguments: Optional[list[AutomatedActionActionListArgumentV1]] = Field(..., alias="action_list_arguments")
185
-
186
-
187
226
  class AutomatedActionsInstanceV1(ConfiguredBaseModel):
188
227
  name: str = Field(..., alias="name")
189
228
  deployment: NamespaceV1 = Field(..., alias="deployment")
190
- actions: Optional[list[Union[AutomatedActionOpenshiftWorkloadRestartV1, AutomatedActionActionListV1, AutomatedActionV1]]] = Field(..., alias="actions")
229
+ actions: Optional[list[Union[AutomatedActionActionListV1, AutomatedActionExternalResourceRdsRebootV1, AutomatedActionOpenshiftWorkloadRestartV1, AutomatedActionV1]]] = Field(..., alias="actions")
191
230
 
192
231
 
193
232
  class AutomatedActionsInstancesQueryData(ConfiguredBaseModel):
@@ -5737,6 +5737,11 @@
5737
5737
  "name": "AutomatedActionCreateToken_v1",
5738
5738
  "ofType": null
5739
5739
  },
5740
+ {
5741
+ "kind": "OBJECT",
5742
+ "name": "AutomatedActionExternalResourceRdsReboot_v1",
5743
+ "ofType": null
5744
+ },
5740
5745
  {
5741
5746
  "kind": "OBJECT",
5742
5747
  "name": "AutomatedActionNoOp_v1",
@@ -27339,6 +27344,11 @@
27339
27344
  "name": "AutomatedActionCreateToken_v1",
27340
27345
  "ofType": null
27341
27346
  },
27347
+ {
27348
+ "kind": "OBJECT",
27349
+ "name": "AutomatedActionExternalResourceRdsReboot_v1",
27350
+ "ofType": null
27351
+ },
27342
27352
  {
27343
27353
  "kind": "OBJECT",
27344
27354
  "name": "AutomatedActionNoOp_v1",
@@ -53500,6 +53510,215 @@
53500
53510
  "enumValues": null,
53501
53511
  "possibleTypes": null
53502
53512
  },
53513
+ {
53514
+ "kind": "OBJECT",
53515
+ "name": "AutomatedActionExternalResourceRdsReboot_v1",
53516
+ "description": null,
53517
+ "fields": [
53518
+ {
53519
+ "name": "schema",
53520
+ "description": null,
53521
+ "args": [],
53522
+ "type": {
53523
+ "kind": "NON_NULL",
53524
+ "name": null,
53525
+ "ofType": {
53526
+ "kind": "SCALAR",
53527
+ "name": "String",
53528
+ "ofType": null
53529
+ }
53530
+ },
53531
+ "isDeprecated": false,
53532
+ "deprecationReason": null
53533
+ },
53534
+ {
53535
+ "name": "path",
53536
+ "description": null,
53537
+ "args": [],
53538
+ "type": {
53539
+ "kind": "NON_NULL",
53540
+ "name": null,
53541
+ "ofType": {
53542
+ "kind": "SCALAR",
53543
+ "name": "String",
53544
+ "ofType": null
53545
+ }
53546
+ },
53547
+ "isDeprecated": false,
53548
+ "deprecationReason": null
53549
+ },
53550
+ {
53551
+ "name": "type",
53552
+ "description": null,
53553
+ "args": [],
53554
+ "type": {
53555
+ "kind": "NON_NULL",
53556
+ "name": null,
53557
+ "ofType": {
53558
+ "kind": "SCALAR",
53559
+ "name": "String",
53560
+ "ofType": null
53561
+ }
53562
+ },
53563
+ "isDeprecated": false,
53564
+ "deprecationReason": null
53565
+ },
53566
+ {
53567
+ "name": "description",
53568
+ "description": null,
53569
+ "args": [],
53570
+ "type": {
53571
+ "kind": "SCALAR",
53572
+ "name": "String",
53573
+ "ofType": null
53574
+ },
53575
+ "isDeprecated": false,
53576
+ "deprecationReason": null
53577
+ },
53578
+ {
53579
+ "name": "maxOps",
53580
+ "description": null,
53581
+ "args": [],
53582
+ "type": {
53583
+ "kind": "NON_NULL",
53584
+ "name": null,
53585
+ "ofType": {
53586
+ "kind": "SCALAR",
53587
+ "name": "Int",
53588
+ "ofType": null
53589
+ }
53590
+ },
53591
+ "isDeprecated": false,
53592
+ "deprecationReason": null
53593
+ },
53594
+ {
53595
+ "name": "instances",
53596
+ "description": null,
53597
+ "args": [],
53598
+ "type": {
53599
+ "kind": "NON_NULL",
53600
+ "name": null,
53601
+ "ofType": {
53602
+ "kind": "LIST",
53603
+ "name": null,
53604
+ "ofType": {
53605
+ "kind": "NON_NULL",
53606
+ "name": null,
53607
+ "ofType": {
53608
+ "kind": "OBJECT",
53609
+ "name": "AutomatedActionsInstance_v1",
53610
+ "ofType": null
53611
+ }
53612
+ }
53613
+ }
53614
+ },
53615
+ "isDeprecated": false,
53616
+ "deprecationReason": null
53617
+ },
53618
+ {
53619
+ "name": "permissions",
53620
+ "description": null,
53621
+ "args": [],
53622
+ "type": {
53623
+ "kind": "LIST",
53624
+ "name": null,
53625
+ "ofType": {
53626
+ "kind": "NON_NULL",
53627
+ "name": null,
53628
+ "ofType": {
53629
+ "kind": "OBJECT",
53630
+ "name": "PermissionAutomatedActions_v1",
53631
+ "ofType": null
53632
+ }
53633
+ }
53634
+ },
53635
+ "isDeprecated": false,
53636
+ "deprecationReason": null
53637
+ },
53638
+ {
53639
+ "name": "arguments",
53640
+ "description": null,
53641
+ "args": [],
53642
+ "type": {
53643
+ "kind": "NON_NULL",
53644
+ "name": null,
53645
+ "ofType": {
53646
+ "kind": "LIST",
53647
+ "name": null,
53648
+ "ofType": {
53649
+ "kind": "NON_NULL",
53650
+ "name": null,
53651
+ "ofType": {
53652
+ "kind": "OBJECT",
53653
+ "name": "AutomatedActionExternalResourceArgument_v1",
53654
+ "ofType": null
53655
+ }
53656
+ }
53657
+ }
53658
+ },
53659
+ "isDeprecated": false,
53660
+ "deprecationReason": null
53661
+ }
53662
+ ],
53663
+ "inputFields": null,
53664
+ "interfaces": [
53665
+ {
53666
+ "kind": "INTERFACE",
53667
+ "name": "AutomatedAction_v1",
53668
+ "ofType": null
53669
+ },
53670
+ {
53671
+ "kind": "INTERFACE",
53672
+ "name": "DatafileObject_v1",
53673
+ "ofType": null
53674
+ }
53675
+ ],
53676
+ "enumValues": null,
53677
+ "possibleTypes": null
53678
+ },
53679
+ {
53680
+ "kind": "OBJECT",
53681
+ "name": "AutomatedActionExternalResourceArgument_v1",
53682
+ "description": null,
53683
+ "fields": [
53684
+ {
53685
+ "name": "namespace",
53686
+ "description": null,
53687
+ "args": [],
53688
+ "type": {
53689
+ "kind": "NON_NULL",
53690
+ "name": null,
53691
+ "ofType": {
53692
+ "kind": "OBJECT",
53693
+ "name": "Namespace_v1",
53694
+ "ofType": null
53695
+ }
53696
+ },
53697
+ "isDeprecated": false,
53698
+ "deprecationReason": null
53699
+ },
53700
+ {
53701
+ "name": "identifier",
53702
+ "description": null,
53703
+ "args": [],
53704
+ "type": {
53705
+ "kind": "NON_NULL",
53706
+ "name": null,
53707
+ "ofType": {
53708
+ "kind": "SCALAR",
53709
+ "name": "String",
53710
+ "ofType": null
53711
+ }
53712
+ },
53713
+ "isDeprecated": false,
53714
+ "deprecationReason": null
53715
+ }
53716
+ ],
53717
+ "inputFields": null,
53718
+ "interfaces": [],
53719
+ "enumValues": null,
53720
+ "possibleTypes": null
53721
+ },
53503
53722
  {
53504
53723
  "kind": "OBJECT",
53505
53724
  "name": "AutomatedActionNoOp_v1",
@@ -122,7 +122,12 @@ def copy_vault_secret(
122
122
  except SecretAccessForbidden:
123
123
  # Raise exception if we can't read the secret from the source vault.
124
124
  # This is likely to be related to the approle permissions.
125
- raise SecretAccessForbidden("Cannot read secret from source vault") from None
125
+ logging.error([
126
+ "replicate_vault_secret",
127
+ "Cannot read secret from source vault",
128
+ path,
129
+ ])
130
+ raise
126
131
  except SecretNotFound:
127
132
  # If the secret is present in vault, but there are no versions of it
128
133
  # we want to be aware of it, but not cause a failure of the complete