qontract-reconcile 0.10.1rc1102__py3-none-any.whl → 0.10.1rc1104__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.1rc1102
3
+ Version: 0.10.1rc1104
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
@@ -699,7 +699,7 @@ reconcile/utils/make.py,sha256=QaEwucrzbl8-VHS66Wfdjfo0ubmAcvt_hZGpiGsKU50,231
699
699
  reconcile/utils/metrics.py,sha256=QN37XJDajWt-FdVGgqqDUkhemwTj0srfb-rhkIBxvsE,18591
700
700
  reconcile/utils/models.py,sha256=BYsgjWyuwO7obMhqADsqEQ-_YJrmy8LmFKHSLMFbo1g,4645
701
701
  reconcile/utils/oauth2_backend_application_session.py,sha256=6W16sMpnWEPFDUX7qi5Cui2yOnmLfpgUxWtB3Ii35D0,4177
702
- reconcile/utils/oc.py,sha256=tHhkBFWCqg6sDo5fbfvSkBhc3jHHM8BFzQGypoHcKYc,65862
702
+ reconcile/utils/oc.py,sha256=B_XFgL3yPhztKGrQNl7sdjCZV3t7zpmN0k62WnOiWlk,66015
703
703
  reconcile/utils/oc_connection_parameters.py,sha256=7DiEGo--TJelfYoZXJFyTBPeTw9kXL3L58vy2fiJnes,9643
704
704
  reconcile/utils/oc_filters.py,sha256=Tz3OwtbUaYKmxENFls5CtPVzkZDeFXknw53dJe-wbT8,1382
705
705
  reconcile/utils/oc_map.py,sha256=U8cYhiaZsomkofzbIjVrl7E7crRxkS2JKsFpVeeHVE8,8964
@@ -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.1rc1102.dist-info/METADATA,sha256=N1pR51ZhYmbxSv-gH0Kxln8oAzdUJiY2dLsdtDvTd6s,2213
874
- qontract_reconcile-0.10.1rc1102.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
- qontract_reconcile-0.10.1rc1102.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
- qontract_reconcile-0.10.1rc1102.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
- qontract_reconcile-0.10.1rc1102.dist-info/RECORD,,
873
+ qontract_reconcile-0.10.1rc1104.dist-info/METADATA,sha256=rUi40XmR4_MJRG1zyLoP6-_oAQacy0RJ1iwVpHKPBtQ,2213
874
+ qontract_reconcile-0.10.1rc1104.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
875
+ qontract_reconcile-0.10.1rc1104.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
876
+ qontract_reconcile-0.10.1rc1104.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
877
+ qontract_reconcile-0.10.1rc1104.dist-info/RECORD,,
@@ -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(
reconcile/utils/oc.py CHANGED
@@ -903,6 +903,8 @@ class OCCli: # pylint: disable=too-many-public-methods
903
903
  return
904
904
 
905
905
  dep_annotations = dep_resource.body["metadata"].get("annotations", {})
906
+ # Note, that annotations might have been set to None explicitly
907
+ dep_annotations = dep_resource.body["metadata"].get("annotations") or {}
906
908
  qontract_recycle = dep_annotations.get("qontract.recycle")
907
909
  if qontract_recycle is True:
908
910
  raise RecyclePodsInvalidAnnotationValue('should be "true"')