qontract-reconcile 0.10.1rc906__py3-none-any.whl → 0.10.1rc909__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.1rc906
3
+ Version: 0.10.1rc909
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
@@ -13,7 +13,7 @@ reconcile/checkpoint.py,sha256=_JhMxrye5BgkRMxWYuf7Upli6XayPINKSsuo3ynHTRc,5010
13
13
  reconcile/cli.py,sha256=W4lRKuz6Z_EHXLf-mQLb3mVdcAr23H4JrY-R8UUPBbs,105862
14
14
  reconcile/closedbox_endpoint_monitoring_base.py,sha256=rLh16BOlBOxTmJ8Si3wWyyEpmMlhh4Znx1Gc36qsmOc,4865
15
15
  reconcile/cluster_deployment_mapper.py,sha256=5gumAaRCcFXsabUJ1dnuUy9WrP_FEEM5JnOnE8ch9sE,2326
16
- reconcile/dashdotdb_base.py,sha256=4gJ_VXOOPXPNrJIkSlOr8N1PD60ciZZqSBobNPhXvUA,4768
16
+ reconcile/dashdotdb_base.py,sha256=l34QDu1G96_Ctnh7ZXdxXgSeCE93GQMdLAkWxmN6vDA,4775
17
17
  reconcile/dashdotdb_cso.py,sha256=IkI_KSZuH_kPn0cIQKXitJXiPPFSyHykrOuFy9h9ZpU,3643
18
18
  reconcile/dashdotdb_dora.py,sha256=YmfxD02tKUAQQzku2aj2DXv1oKkAr4V_2lrPVtTFGyI,17674
19
19
  reconcile/dashdotdb_dvo.py,sha256=lCkZ0iby6HrNQb-3kYb6xrt8wCjVUZYxKzz9SiStfHU,8946
@@ -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=5h9yovk_21SPvv-bDjF02TW4C3uuDBS20I3UQXo7RPI,4154
33
33
  reconcile/gitlab_housekeeping.py,sha256=3swjgFPhQC5M1Dthyf6Xu-ZcWdE3-2cvDpoLvr3Gvls,21181
34
- reconcile/gitlab_labeler.py,sha256=4xJHmVX155fclrHqkR926sL1GH6RTN5XfZ8PnqNXbRA,4534
34
+ reconcile/gitlab_labeler.py,sha256=a7HToXqv4S72TBp6Dmu2OkjjO60k81kH3B0J4UXHs3A,4768
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
@@ -667,7 +667,7 @@ reconcile/utils/imap_client.py,sha256=PMsX8UjJ2F59fXbbqREjLVdapYWznYTB8svFmpt39q
667
667
  reconcile/utils/instrumented_wrappers.py,sha256=eVwMoa6FCrYxLv3RML3WpZF9qKVfCTjMxphgVXG03OM,1073
668
668
  reconcile/utils/jenkins_api.py,sha256=RaKuZmO7_lbI-hE6c_Pq2a6CQdmBVj7BcP2jR68cIbI,7081
669
669
  reconcile/utils/jira_client.py,sha256=VdWJfI9VAK2ZtYHmvuqL635t0S5eYtmBY6zR8R-qr-s,7775
670
- reconcile/utils/jjb_client.py,sha256=crbNkZocYTPBTEindscfLjaI7pi-91Tn7HVhkE6tF9E,14424
670
+ reconcile/utils/jjb_client.py,sha256=Bdxk18lWxxZVMM1hTqTpe0JZ6uj8eqpfoQiFhLHEPy8,14501
671
671
  reconcile/utils/jsonpath.py,sha256=wdxOMqR-GMpQf5vRPWRMqAF7bCiXDBkkcFfY2U4j_tk,5536
672
672
  reconcile/utils/jump_host.py,sha256=W3w0S-Qa-VLK5JGg-G4f2a4_5GA34KZVV3XNAaI53Y4,5148
673
673
  reconcile/utils/keycloak.py,sha256=YWSEUGrOVqFaJUk055dKUWpLDPdDRvhcmvR-lfbmxdE,3388
@@ -844,8 +844,8 @@ tools/test/test_qontract_cli.py,sha256=_D61RFGAN5x44CY1tYbouhlGXXABwYfxKSWSQx3Jr
844
844
  tools/test/test_saas_promotion_state.py,sha256=dy4kkSSAQ7bC0Xp2CociETGN-2aABEfL6FU5D9Jl00Y,6056
845
845
  tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
846
846
  tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
847
- qontract_reconcile-0.10.1rc906.dist-info/METADATA,sha256=NaNsfgzOVbHepp-YNXLE0eHLI1zIu8KZ27c6MAOX_40,2273
848
- qontract_reconcile-0.10.1rc906.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
- qontract_reconcile-0.10.1rc906.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
- qontract_reconcile-0.10.1rc906.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
- qontract_reconcile-0.10.1rc906.dist-info/RECORD,,
847
+ qontract_reconcile-0.10.1rc909.dist-info/METADATA,sha256=4xlbiQ_CqGDzQWvfDN7K-JbCPpAyZwGmtccuEI9RAdU,2273
848
+ qontract_reconcile-0.10.1rc909.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
849
+ qontract_reconcile-0.10.1rc909.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
850
+ qontract_reconcile-0.10.1rc909.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
851
+ qontract_reconcile-0.10.1rc909.dist-info/RECORD,,
@@ -50,7 +50,7 @@ class DashdotdbBase:
50
50
  self.dashdotdb_pass = self.secret_content["password"]
51
51
  self.logmarker = marker
52
52
  self.scope = scope
53
- self.dashdotdb_token: str | None
53
+ self.dashdotdb_token: str | None = None
54
54
 
55
55
  def _get_token(self) -> None:
56
56
  if self.dry_run:
@@ -1,9 +1,6 @@
1
1
  import logging
2
2
  import os
3
- from collections.abc import (
4
- Iterable,
5
- Set,
6
- )
3
+ from collections.abc import Iterable
7
4
 
8
5
  from reconcile import queries
9
6
  from reconcile.gitlab_housekeeping import (
@@ -14,6 +11,7 @@ from reconcile.utils.gitlab_api import GitLabApi
14
11
 
15
12
  LABEL_COLOR = "#0000FF" # Color blue in hex for labels
16
13
  QONTRACT_INTEGRATION = "gitlab-labeler"
14
+ TEST_ON_RHEL8_AI = "test-on-rhel8-ai"
17
15
 
18
16
 
19
17
  def get_app_list() -> dict:
@@ -80,7 +78,7 @@ def guess_onboarding_status(
80
78
 
81
79
  def guess_labels(
82
80
  project_labels: Iterable[str], changed_paths: Iterable[str]
83
- ) -> Set[str]:
81
+ ) -> set[str]:
84
82
  """
85
83
  Guess labels returns a list of labels from the project labels
86
84
  that contain parts of the changed paths.
@@ -129,8 +127,14 @@ def run(dry_run, gitlab_project_id=None, gitlab_merge_request_id=None) -> None:
129
127
  project_labels = gl.get_project_labels()
130
128
  merge_request = gl.get_merge_request(gitlab_merge_request_id)
131
129
  changed_paths = gl.get_merge_request_changed_paths(merge_request)
132
- guessed_labels = guess_labels(project_labels, changed_paths)
133
- labels_to_add = guessed_labels - set(merge_request.labels)
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)
134
138
  labels_to_create = labels_to_add - project_labels
135
139
 
136
140
  # This integration cannot check dry-run mode as it's always running with
@@ -288,6 +288,8 @@ class JJB: # pylint: disable=too-many-public-methods
288
288
  project_url_raw = job["properties"][0]["github"]["url"]
289
289
  if "https://github.com" in project_url_raw:
290
290
  continue
291
+ if job.get("disabled"):
292
+ continue
291
293
  job_url = "{}/project/{}".format(
292
294
  self.instance_urls[name], job["name"]
293
295
  )