qontract-reconcile 0.10.1rc1067__py3-none-any.whl → 0.10.1rc1068__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.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/RECORD +7 -7
- reconcile/change_owners/change_log_tracking.py +14 -1
- reconcile/cli.py +3 -1
- {qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.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.1rc1068
|
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.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/RECORD
RENAMED
@@ -10,7 +10,7 @@ reconcile/aws_iam_password_reset.py,sha256=q96mwr2KeEQ5bpNniGlgIMZTxiuLSodcYfX-t
|
|
10
10
|
reconcile/aws_support_cases_sos.py,sha256=hl_9L53yQYRQxKs3IWrd69Cc60XK067g_bJRM9B0udo,2975
|
11
11
|
reconcile/blackbox_exporter_endpoint_monitoring.py,sha256=O1wFp52EyF538c6txaWBs8eMtUIy19gyHZ6VzJ6QXS8,3512
|
12
12
|
reconcile/checkpoint.py,sha256=_JhMxrye5BgkRMxWYuf7Upli6XayPINKSsuo3ynHTRc,5010
|
13
|
-
reconcile/cli.py,sha256=
|
13
|
+
reconcile/cli.py,sha256=ipCFQNRFmaoo_DoeAvMY3bTYfaovOgWhRvL6TYuk1G8,107605
|
14
14
|
reconcile/closedbox_endpoint_monitoring_base.py,sha256=rLh16BOlBOxTmJ8Si3wWyyEpmMlhh4Znx1Gc36qsmOc,4865
|
15
15
|
reconcile/cluster_deployment_mapper.py,sha256=5gumAaRCcFXsabUJ1dnuUy9WrP_FEEM5JnOnE8ch9sE,2326
|
16
16
|
reconcile/dashdotdb_base.py,sha256=l34QDu1G96_Ctnh7ZXdxXgSeCE93GQMdLAkWxmN6vDA,4775
|
@@ -161,7 +161,7 @@ reconcile/aws_version_sync/merge_request_manager/merge_request_manager.py,sha256
|
|
161
161
|
reconcile/change_owners/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
162
162
|
reconcile/change_owners/approver.py,sha256=Z3_11vnK2WNOxjEEXVDh0224-_-qbt9d6mBeVE-7fsc,2259
|
163
163
|
reconcile/change_owners/bundle.py,sha256=ZIlXRo6Z2raeWSCUqYsexBdol-q-r9kWJs5O_YPaEYk,5273
|
164
|
-
reconcile/change_owners/change_log_tracking.py,sha256=
|
164
|
+
reconcile/change_owners/change_log_tracking.py,sha256=XE-DbH3ktABaeEVdP6EoVsI6s3Nk21l6WKbHd3zMouM,5555
|
165
165
|
reconcile/change_owners/change_owners.py,sha256=0HRJhDm0oW3uYJFgzynqA1gA0lbhalhSkmWOiQmr-NM,17062
|
166
166
|
reconcile/change_owners/change_types.py,sha256=TjVtvmkU0s8w2NA6qvWQccB6PwlCrChFySlsHLYZjpE,32027
|
167
167
|
reconcile/change_owners/changes.py,sha256=pa3cNAL-Xawh700ARJJQjY0p09NA1J2329RcE0F0MHM,17224
|
@@ -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.
|
874
|
-
qontract_reconcile-0.10.
|
875
|
-
qontract_reconcile-0.10.
|
876
|
-
qontract_reconcile-0.10.
|
877
|
-
qontract_reconcile-0.10.
|
873
|
+
qontract_reconcile-0.10.1rc1068.dist-info/METADATA,sha256=t9h0tIlI0IrPewwkSB9j0KcSSRuFAboN84twelBFxLQ,2213
|
874
|
+
qontract_reconcile-0.10.1rc1068.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
875
|
+
qontract_reconcile-0.10.1rc1068.dist-info/entry_points.txt,sha256=GKQqCl2j2X1BJQ69een6rHcR26PmnxnONLNOQB-nRjY,491
|
876
|
+
qontract_reconcile-0.10.1rc1068.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
877
|
+
qontract_reconcile-0.10.1rc1068.dist-info/RECORD,,
|
@@ -6,7 +6,10 @@ from reconcile.change_owners.bundle import (
|
|
6
6
|
NoOpFileDiffResolver,
|
7
7
|
QontractServerDiff,
|
8
8
|
)
|
9
|
-
from reconcile.change_owners.change_owners import
|
9
|
+
from reconcile.change_owners.change_owners import (
|
10
|
+
fetch_change_type_processors,
|
11
|
+
init_gitlab,
|
12
|
+
)
|
10
13
|
from reconcile.change_owners.change_types import ChangeTypeContext
|
11
14
|
from reconcile.change_owners.changes import aggregate_file_moves, parse_bundle_changes
|
12
15
|
from reconcile.typed_queries.apps import get_apps
|
@@ -25,6 +28,7 @@ BUNDLE_DIFFS_OBJ = "bundle-diffs.json"
|
|
25
28
|
@dataclass
|
26
29
|
class ChangeLogItem:
|
27
30
|
commit: str
|
31
|
+
created_at: str
|
28
32
|
change_types: list[str] = field(default_factory=list)
|
29
33
|
error: bool = False
|
30
34
|
apps: list[str] = field(default_factory=list)
|
@@ -36,6 +40,7 @@ class ChangeLog:
|
|
36
40
|
|
37
41
|
|
38
42
|
class ChangeLogIntegrationParams(PydanticRunParams):
|
43
|
+
gitlab_project_id: str
|
39
44
|
process_existing: bool = False
|
40
45
|
|
41
46
|
|
@@ -78,6 +83,9 @@ class ChangeLogIntegration(QontractReconcileIntegration[ChangeLogIntegrationPara
|
|
78
83
|
ChangeLogItem(**i) # type: ignore[arg-type]
|
79
84
|
for i in existing_change_log.items
|
80
85
|
]
|
86
|
+
gl = init_gitlab(self.params.gitlab_project_id)
|
87
|
+
if defer:
|
88
|
+
defer(gl.cleanup)
|
81
89
|
change_log = ChangeLog()
|
82
90
|
for item in diff_state.ls():
|
83
91
|
key = item.lstrip("/")
|
@@ -92,8 +100,10 @@ class ChangeLogIntegration(QontractReconcileIntegration[ChangeLogIntegrationPara
|
|
92
100
|
continue
|
93
101
|
|
94
102
|
logging.info(f"Processing commit {commit}")
|
103
|
+
gl_commit = gl.project.commits.get(commit)
|
95
104
|
change_log_item = ChangeLogItem(
|
96
105
|
commit=commit,
|
106
|
+
created_at=gl_commit.created_at,
|
97
107
|
)
|
98
108
|
change_log.items.append(change_log_item)
|
99
109
|
obj = diff_state.get(key, None)
|
@@ -135,5 +145,8 @@ class ChangeLogIntegration(QontractReconcileIntegration[ChangeLogIntegrationPara
|
|
135
145
|
if ctp.name not in change_log_item.change_types:
|
136
146
|
change_log_item.change_types.append(ctp.name)
|
137
147
|
|
148
|
+
change_log.items = sorted(
|
149
|
+
change_log.items, key=lambda i: i.created_at, reverse=True
|
150
|
+
)
|
138
151
|
if not dry_run:
|
139
152
|
integration_state.add(BUNDLE_DIFFS_OBJ, asdict(change_log), force=True)
|
reconcile/cli.py
CHANGED
@@ -3558,13 +3558,14 @@ def change_owners(
|
|
3558
3558
|
|
3559
3559
|
|
3560
3560
|
@integration.command(short_help="Analyze bundle diffs by change types.")
|
3561
|
+
@gitlab_project_id
|
3561
3562
|
@click.option(
|
3562
3563
|
"--process-existing/--no-process-existing",
|
3563
3564
|
default=False,
|
3564
3565
|
help="wait for pending/running pipelines before acting.",
|
3565
3566
|
)
|
3566
3567
|
@click.pass_context
|
3567
|
-
def change_log_tracking(ctx, process_existing):
|
3568
|
+
def change_log_tracking(ctx, gitlab_project_id, process_existing):
|
3568
3569
|
from reconcile.change_owners.change_log_tracking import (
|
3569
3570
|
ChangeLogIntegration,
|
3570
3571
|
ChangeLogIntegrationParams,
|
@@ -3573,6 +3574,7 @@ def change_log_tracking(ctx, process_existing):
|
|
3573
3574
|
run_class_integration(
|
3574
3575
|
ChangeLogIntegration(
|
3575
3576
|
ChangeLogIntegrationParams(
|
3577
|
+
gitlab_project_id=gitlab_project_id,
|
3576
3578
|
process_existing=process_existing,
|
3577
3579
|
)
|
3578
3580
|
),
|
{qontract_reconcile-0.10.1rc1067.dist-info → qontract_reconcile-0.10.1rc1068.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|