qontract-reconcile 0.10.1rc940__py3-none-any.whl → 0.10.1rc942__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.1rc940
3
+ Version: 0.10.1rc942
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
@@ -31,7 +31,7 @@ reconcile/github_users.py,sha256=nfTq78QRONIfDVj-5O3bD6psllJjzWFnog-EJ1WqFPU,367
31
31
  reconcile/github_validator.py,sha256=cVTVxJIGR4a1Jz8wrdXEAb_CMpXUzvykVmUURX4cook,917
32
32
  reconcile/gitlab_fork_compliance.py,sha256=5joAIGOOLhHme1ipa7ZQeQkUOVe3dKbRO1wJtTwyNR4,4178
33
33
  reconcile/gitlab_housekeeping.py,sha256=5qIJPflQzwSg3iTSCw7ClEM4VHrn70WLXyYCX9vTZ7Y,22004
34
- reconcile/gitlab_labeler.py,sha256=a7HToXqv4S72TBp6Dmu2OkjjO60k81kH3B0J4UXHs3A,4768
34
+ reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4534
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
@@ -842,8 +842,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
842
842
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
843
843
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
844
844
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
845
- qontract_reconcile-0.10.1rc940.dist-info/METADATA,sha256=J7rHvi9BG3xcDI8XfR2-qBhCHm4A-q0RZ9GyVkmRF8k,2262
846
- qontract_reconcile-0.10.1rc940.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
847
- qontract_reconcile-0.10.1rc940.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
848
- qontract_reconcile-0.10.1rc940.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
849
- qontract_reconcile-0.10.1rc940.dist-info/RECORD,,
845
+ qontract_reconcile-0.10.1rc942.dist-info/METADATA,sha256=LnuGjDStHCcmDoK-WgUvP6Afuscee9cW5zp1wy28cdg,2262
846
+ qontract_reconcile-0.10.1rc942.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
847
+ qontract_reconcile-0.10.1rc942.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
848
+ qontract_reconcile-0.10.1rc942.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
849
+ qontract_reconcile-0.10.1rc942.dist-info/RECORD,,
@@ -1,6 +1,9 @@
1
1
  import logging
2
2
  import os
3
- from collections.abc import Iterable
3
+ from collections.abc import (
4
+ Iterable,
5
+ Set,
6
+ )
4
7
 
5
8
  from reconcile import queries
6
9
  from reconcile.gitlab_housekeeping import (
@@ -11,7 +14,6 @@ from reconcile.utils.gitlab_api import GitLabApi
11
14
 
12
15
  LABEL_COLOR = "#0000FF" # Color blue in hex for labels
13
16
  QONTRACT_INTEGRATION = "gitlab-labeler"
14
- TEST_ON_RHEL8_AI = "test-on-rhel8-ai"
15
17
 
16
18
 
17
19
  def get_app_list() -> dict:
@@ -78,7 +80,7 @@ def guess_onboarding_status(
78
80
 
79
81
  def guess_labels(
80
82
  project_labels: Iterable[str], changed_paths: Iterable[str]
81
- ) -> set[str]:
83
+ ) -> Set[str]:
82
84
  """
83
85
  Guess labels returns a list of labels from the project labels
84
86
  that contain parts of the changed paths.
@@ -127,14 +129,8 @@ def run(dry_run, gitlab_project_id=None, gitlab_merge_request_id=None) -> None:
127
129
  project_labels = gl.get_project_labels()
128
130
  merge_request = gl.get_merge_request(gitlab_merge_request_id)
129
131
  changed_paths = gl.get_merge_request_changed_paths(merge_request)
130
- new_labels = guess_labels(project_labels, changed_paths)
131
-
132
- author = merge_request.author["username"]
133
- app_sre_team_members = [u.username for u in gl.get_app_sre_group_users()]
134
- if author in app_sre_team_members:
135
- new_labels.add(TEST_ON_RHEL8_AI)
136
-
137
- labels_to_add = new_labels - set(merge_request.labels)
132
+ guessed_labels = guess_labels(project_labels, changed_paths)
133
+ labels_to_add = guessed_labels - set(merge_request.labels)
138
134
  labels_to_create = labels_to_add - project_labels
139
135
 
140
136
  # This integration cannot check dry-run mode as it's always running with