qontract-reconcile 0.10.1rc940__py3-none-any.whl → 0.10.1rc941__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.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/RECORD +6 -6
- reconcile/gitlab_labeler.py +7 -11
- {qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.
|
3
|
+
Version: 0.10.1rc941
|
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
|
{qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/RECORD
RENAMED
@@ -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=
|
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.
|
846
|
-
qontract_reconcile-0.10.
|
847
|
-
qontract_reconcile-0.10.
|
848
|
-
qontract_reconcile-0.10.
|
849
|
-
qontract_reconcile-0.10.
|
845
|
+
qontract_reconcile-0.10.1rc941.dist-info/METADATA,sha256=S6kotXcqOCrbf-Yc5aFLVQBxvJj3t-6msgOz0DZ1pBg,2262
|
846
|
+
qontract_reconcile-0.10.1rc941.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
847
|
+
qontract_reconcile-0.10.1rc941.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
848
|
+
qontract_reconcile-0.10.1rc941.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
849
|
+
qontract_reconcile-0.10.1rc941.dist-info/RECORD,,
|
reconcile/gitlab_labeler.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
import logging
|
2
2
|
import os
|
3
|
-
from collections.abc import
|
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
|
-
) ->
|
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
|
-
|
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
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc940.dist-info → qontract_reconcile-0.10.1rc941.dist-info}/top_level.txt
RENAMED
File without changes
|