qontract-reconcile 0.10.2.dev102__py3-none-any.whl → 0.10.2.dev104__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.
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/RECORD +6 -6
- reconcile/external_resources/integration.py +3 -0
- reconcile/gitlab_owners.py +14 -0
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev104
|
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
|
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/RECORD
RENAMED
@@ -34,7 +34,7 @@ reconcile/gitlab_housekeeping.py,sha256=Gy1mhn33xGp9IyQFqs4VrBmhwJBD6x90XITDR_pU
|
|
34
34
|
reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4534
|
35
35
|
reconcile/gitlab_members.py,sha256=MUIgYDLeJx2-_vMypyq2Pa17cpKdXATYhtVACS2ghpQ,8297
|
36
36
|
reconcile/gitlab_mr_sqs_consumer.py,sha256=O46mdziPgGOndbU-0_UJKJVUaiEoVzJPEgKm4_UvYoI,2571
|
37
|
-
reconcile/gitlab_owners.py,sha256=
|
37
|
+
reconcile/gitlab_owners.py,sha256=qDiCe5So5IaNOQl9i2kbUryzJKMFqEy5nRaEj2sGf6A,13938
|
38
38
|
reconcile/gitlab_permissions.py,sha256=gSGH6gAdJbPy5Z0rQGUqiNQSHty_tXQ_3Y4OQP_8nFs,8067
|
39
39
|
reconcile/gitlab_projects.py,sha256=K3tFf_aD1W4Ijp5q-9Qek3kwFGEWPcZ1kd7tzFJ4GyQ,1781
|
40
40
|
reconcile/integrations_manager.py,sha256=CY7cOj5dzt2se4IOg11VQvGQ-eTvLML5Q42Z9SSgeSk,9463
|
@@ -197,7 +197,7 @@ reconcile/endpoints_discovery/merge_request_manager.py,sha256=a8zTIQIpRrUwXexZCl
|
|
197
197
|
reconcile/external_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
198
198
|
reconcile/external_resources/aws.py,sha256=q9ub1vI4meG8YzM6A88Q422XkTu6Y3ja12GuMjCwISs,11631
|
199
199
|
reconcile/external_resources/factories.py,sha256=C0QHT0soEv6z99-ELAAE19S5MaMHhV0t1fSiQn0Coc4,5970
|
200
|
-
reconcile/external_resources/integration.py,sha256=
|
200
|
+
reconcile/external_resources/integration.py,sha256=WF6O4rT0oUHbNaWEemjLLzCqdNSQIUaymUuj08VsIl8,7034
|
201
201
|
reconcile/external_resources/integration_secrets_sync.py,sha256=CImwt_tyS3MMGpkjI_0gZqYt4XgqIw4BtdJiDH2xrCk,1700
|
202
202
|
reconcile/external_resources/manager.py,sha256=mvFfcXPzvNqDWDgKTK8eiSe6C_FUvBtben3bSqrqSoc,18246
|
203
203
|
reconcile/external_resources/meta.py,sha256=noaytFzmShpzLA_ebGh7wuP45mOfHIOnnoUxivjDa1I,672
|
@@ -786,7 +786,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
786
786
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=UfwwRLS5Ya4_Nh1w5n1dvoYtchQvYE9yj1VANt2IKqI,3925
|
787
787
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
788
788
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
789
|
-
qontract_reconcile-0.10.2.
|
790
|
-
qontract_reconcile-0.10.2.
|
791
|
-
qontract_reconcile-0.10.2.
|
792
|
-
qontract_reconcile-0.10.2.
|
789
|
+
qontract_reconcile-0.10.2.dev104.dist-info/METADATA,sha256=9v7ZHcP0L3QPNkpFKt5otqVTbrmy-UdvbWu2r3hFwzM,24566
|
790
|
+
qontract_reconcile-0.10.2.dev104.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
791
|
+
qontract_reconcile-0.10.2.dev104.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
792
|
+
qontract_reconcile-0.10.2.dev104.dist-info/RECORD,,
|
@@ -143,6 +143,9 @@ def run(
|
|
143
143
|
workers_cluster: str | None = None,
|
144
144
|
workers_namespace: str | None = None,
|
145
145
|
) -> None:
|
146
|
+
if dry_run and not dry_run_job_suffix:
|
147
|
+
raise RuntimeError("dry_run needs a dry_run_job_suffix")
|
148
|
+
|
146
149
|
vault_settings = get_app_interface_vault_settings()
|
147
150
|
secret_reader = create_secret_reader(use_vault=vault_settings.vault)
|
148
151
|
er_settings = get_settings()
|
reconcile/gitlab_owners.py
CHANGED
@@ -94,6 +94,13 @@ class MRApproval:
|
|
94
94
|
lgtms.append(comment["username"])
|
95
95
|
return lgtms
|
96
96
|
|
97
|
+
def expand_groups(self, owners: list[str]) -> set[str]:
|
98
|
+
members: set[str] = set()
|
99
|
+
for name in owners:
|
100
|
+
if group := self.gitlab.get_group_if_exists(name):
|
101
|
+
members.update(m.username for m in self.gitlab.get_group_members(group))
|
102
|
+
return members.union(owners)
|
103
|
+
|
97
104
|
def get_approval_status(self):
|
98
105
|
approval_status = {"approved": False, "report": None}
|
99
106
|
|
@@ -117,6 +124,13 @@ class MRApproval:
|
|
117
124
|
if approver in lgtms:
|
118
125
|
change_approved = True
|
119
126
|
|
127
|
+
if (
|
128
|
+
not change_approved
|
129
|
+
and lgtms
|
130
|
+
and self.expand_groups(change_owners["approvers"]).intersection(lgtms)
|
131
|
+
):
|
132
|
+
change_approved = True
|
133
|
+
|
120
134
|
# Each change that was not yet approved will generate
|
121
135
|
# a report message
|
122
136
|
report[change_path] = {}
|
{qontract_reconcile-0.10.2.dev102.dist-info → qontract_reconcile-0.10.2.dev104.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|