qontract-reconcile 0.10.1rc1101__py3-none-any.whl → 0.10.1rc1103__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.1rc1101
3
+ Version: 0.10.1rc1103
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
@@ -35,7 +35,7 @@ reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4
35
35
  reconcile/gitlab_members.py,sha256=PrJE9OhDRdGG_gHM_77nQojLb4B18jtUu8DxgLsRS88,8417
36
36
  reconcile/gitlab_mr_sqs_consumer.py,sha256=O46mdziPgGOndbU-0_UJKJVUaiEoVzJPEgKm4_UvYoI,2571
37
37
  reconcile/gitlab_owners.py,sha256=sn9njaKOtqcvnhi2qtm-faAfAR4zNqflbSuusA9RUuI,13456
38
- reconcile/gitlab_permissions.py,sha256=tEjbpr-QH03vZ4L6CuVJhkgA3oaB_gyJ7d58MTR4JJQ,7389
38
+ reconcile/gitlab_permissions.py,sha256=6ZBPnQci4-1LVJBvaUS-c0QwIJjITNKVflCeH-Y5Lbk,7507
39
39
  reconcile/gitlab_projects.py,sha256=K3tFf_aD1W4Ijp5q-9Qek3kwFGEWPcZ1kd7tzFJ4GyQ,1781
40
40
  reconcile/integrations_manager.py,sha256=gvOhVklJDeMPURxLjV30Q4hnLET3BZ-NeEEtQBoo_E0,9500
41
41
  reconcile/jenkins_base.py,sha256=0Gocu3fU2YTltaxBlbDQOUvP-7CP2OSQV1ZRwtWeVXw,875
@@ -161,10 +161,10 @@ reconcile/aws_version_sync/merge_request_manager/merge_request_manager.py,sha256
161
161
  reconcile/change_owners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
162
162
  reconcile/change_owners/approver.py,sha256=Z3_11vnK2WNOxjEEXVDh0224-_-qbt9d6mBeVE-7fsc,2259
163
163
  reconcile/change_owners/bundle.py,sha256=h30fU-JmLH5a-rCAovpzTeTkkkgZztsZ5A2raee0YuU,5355
164
- reconcile/change_owners/change_log_tracking.py,sha256=aL-o6Lf2yYaA6dB5-Ays1HFDcAu3i2iErc4fEzXVM0Q,7399
164
+ reconcile/change_owners/change_log_tracking.py,sha256=qfiUBneSuW6YlhNYN55d9bdg3MKbw-0erPnVvXdQY-s,7591
165
165
  reconcile/change_owners/change_owners.py,sha256=0HRJhDm0oW3uYJFgzynqA1gA0lbhalhSkmWOiQmr-NM,17062
166
166
  reconcile/change_owners/change_types.py,sha256=HEsoBduhcczAXZHwT26mr5sVPxtf8J6tsvjSDDI1ceI,32077
167
- reconcile/change_owners/changes.py,sha256=IO2va8RZ1UsC_iosQR7qiQir7UwGuMQfFwceoU0utCI,18162
167
+ reconcile/change_owners/changes.py,sha256=qdw4ZxOVbTzSATxmLUtJ9HA6BZXwxkHfQljrWv-Q8sU,18244
168
168
  reconcile/change_owners/decision.py,sha256=iUJcIc_N_RqXIAY8D10RZqPMC2OinsHTMcqI6f6uylE,7606
169
169
  reconcile/change_owners/diff.py,sha256=0vyu29xCL24ZhUa7hqBni0NaxoCYRXLwvA-h8V23YQ4,9009
170
170
  reconcile/change_owners/implicit_ownership.py,sha256=6BehZvx4IjrphmOt_LLLk9_02Fl5BY5jd00Wuz_PBZk,4234
@@ -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.1rc1101.dist-info/METADATA,sha256=g1LfiSTlD-qoWDR18IcyuGhQs79G8iJcEUC_dYQjl8c,2213
874
- qontract_reconcile-0.10.1rc1101.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
- qontract_reconcile-0.10.1rc1101.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
- qontract_reconcile-0.10.1rc1101.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
- qontract_reconcile-0.10.1rc1101.dist-info/RECORD,,
873
+ qontract_reconcile-0.10.1rc1103.dist-info/METADATA,sha256=GM-UunZmagc8JZ3HhTveGavkowHAMwMbPmk4TuCLr-k,2213
874
+ qontract_reconcile-0.10.1rc1103.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
+ qontract_reconcile-0.10.1rc1103.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
+ qontract_reconcile-0.10.1rc1103.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
+ qontract_reconcile-0.10.1rc1103.dist-info/RECORD,,
@@ -134,8 +134,12 @@ class ChangeLogIntegration(QontractReconcileIntegration[ChangeLogIntegrationPara
134
134
  continue
135
135
  diff = QontractServerDiff(**obj)
136
136
  changes = aggregate_resource_changes(
137
- aggregate_file_moves(parse_bundle_changes(diff)),
138
- {c.path: c.dict() for c in namespaces + jenkins_configs},
137
+ bundle_changes=aggregate_file_moves(parse_bundle_changes(diff)),
138
+ content_store={c.path: c.dict() for c in namespaces + jenkins_configs},
139
+ supported_schemas={
140
+ "/openshift/namespace-1.yml",
141
+ "/dependencies/jenkins-config-1.yml",
142
+ },
139
143
  )
140
144
  for change in changes:
141
145
  logging.debug(f"Processing change {change}")
@@ -462,6 +462,7 @@ def parse_bundle_changes(
462
462
  def aggregate_resource_changes(
463
463
  bundle_changes: list[BundleFileChange],
464
464
  content_store: dict[str, Any],
465
+ supported_schemas: set[str],
465
466
  ) -> list[BundleFileChange]:
466
467
  resource_changes = [
467
468
  BundleFileChange(
@@ -481,7 +482,8 @@ def aggregate_resource_changes(
481
482
  )
482
483
  for change in bundle_changes
483
484
  for file_ref in change.old_backrefs | change.new_backrefs
484
- if (file_content := content_store[file_ref.path])
485
+ if file_ref.schema in supported_schemas
486
+ and (file_content := content_store[file_ref.path])
485
487
  ]
486
488
 
487
489
  return bundle_changes + resource_changes
@@ -3,6 +3,7 @@ import logging
3
3
  from dataclasses import dataclass
4
4
  from typing import Any
5
5
 
6
+ from gitlab.exceptions import GitlabGetError
6
7
  from gitlab.v4.objects import (
7
8
  GroupProject,
8
9
  Project,
@@ -78,7 +79,10 @@ class GroupPermissionHandler:
78
79
 
79
80
  def can_share_project(self, project: Project) -> bool:
80
81
  # check if user have access greater or equal access to be shared with the group
81
- user = project.members_all.get(id=self.gl.user.id)
82
+ try:
83
+ user = project.members_all.get(id=self.gl.user.id)
84
+ except GitlabGetError:
85
+ return False
82
86
  return user.access_level >= self.access_level
83
87
 
84
88
  def reconcile(