qontract-reconcile 0.10.2.dev6__py3-none-any.whl → 0.10.2.dev7__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.dev6
3
+ Version: 0.10.2.dev7
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
@@ -35,7 +35,7 @@ reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4
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
37
  reconcile/gitlab_owners.py,sha256=sn9njaKOtqcvnhi2qtm-faAfAR4zNqflbSuusA9RUuI,13456
38
- reconcile/gitlab_permissions.py,sha256=6ZBPnQci4-1LVJBvaUS-c0QwIJjITNKVflCeH-Y5Lbk,7507
38
+ reconcile/gitlab_permissions.py,sha256=hJ1KNrWGD8dM5ozELxUqKKFvHFP1yfUZKO4e3dZ_NwM,8092
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
@@ -766,7 +766,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
766
766
  tools/saas_promotion_state/saas_promotion_state.py,sha256=5LJ9rygZ304vxfsIuRfuxueoYRb72EZNKKITEcJ4Mtk,3908
767
767
  tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
768
768
  tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
769
- qontract_reconcile-0.10.2.dev6.dist-info/METADATA,sha256=XH6LW3B3BM4fyIy9urLw7UrTe-exQ-INWXszkQNnXhk,24664
770
- qontract_reconcile-0.10.2.dev6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
771
- qontract_reconcile-0.10.2.dev6.dist-info/entry_points.txt,sha256=JniHZPadNOILPyfSl0LF2YSp3Db7K2_W2CN7i9f3Gos,540
772
- qontract_reconcile-0.10.2.dev6.dist-info/RECORD,,
769
+ qontract_reconcile-0.10.2.dev7.dist-info/METADATA,sha256=45V1tMRWAHSh5LIcjmF_QZwjk7uVQDqW-Zdz-JcVSNE,24664
770
+ qontract_reconcile-0.10.2.dev7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
771
+ qontract_reconcile-0.10.2.dev7.dist-info/entry_points.txt,sha256=JniHZPadNOILPyfSl0LF2YSp3Db7K2_W2CN7i9f3Gos,540
772
+ qontract_reconcile-0.10.2.dev7.dist-info/RECORD,,
@@ -90,6 +90,13 @@ class GroupPermissionHandler:
90
90
  desired_state: dict[str, GroupSpec],
91
91
  current_state: dict[str, GroupSpec],
92
92
  ) -> None:
93
+ # gather list of app-interface managed repos
94
+ managed_repos: set[str] = set()
95
+ instance = queries.get_gitlab_instance()
96
+ for project_request in instance.get("projectRequests", []):
97
+ for r in project_request.get("projects", []):
98
+ managed_repos.add(f"{instance['url']}/{project_request['group']}/{r}")
99
+
93
100
  # get the diff data
94
101
  diff_data = diff_mappings(
95
102
  current=current_state,
@@ -100,6 +107,11 @@ class GroupPermissionHandler:
100
107
  errors: list[Exception] = []
101
108
  for repo in diff_data.add:
102
109
  project = self.gl.get_project(repo)
110
+ if not project and repo in managed_repos:
111
+ logging.info(
112
+ f"New app-interface managed repository {repo} hasn't been created yet - skipping"
113
+ )
114
+ continue
103
115
  if not self.can_share_project(project):
104
116
  errors.append(
105
117
  GroupAccessLevelError(