qontract-reconcile 0.10.1rc720__py3-none-any.whl → 0.10.1rc722__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.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/RECORD +14 -14
- reconcile/openshift_base.py +1 -1
- reconcile/saas_auto_promotions_manager/publisher.py +7 -1
- reconcile/saas_auto_promotions_manager/s3_exporter.py +1 -1
- reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py +10 -2
- reconcile/test/saas_auto_promotions_manager/subscriber/conftest.py +3 -0
- reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_multiple_publishers_for_single_channel.py +3 -1
- reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_use_target_config_hash.py +2 -1
- reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_with_auto_promote.py +2 -1
- reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_without_auto_promote.py +2 -1
- {qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/entry_points.txt +0 -0
- {qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/top_level.txt +0 -0
{qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.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.1rc722
|
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.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/RECORD
RENAMED
@@ -61,7 +61,7 @@ reconcile/ocm_groups.py,sha256=CluPyvmwE5JOZS2HQSReC1sD8L1ChhnJlAg8lcwdtxc,3395
|
|
61
61
|
reconcile/ocm_machine_pools.py,sha256=oY4oLPm5Y_ajBV8KFg2LuBQvsZl-CxTjSxEyxg4b2OI,16634
|
62
62
|
reconcile/ocm_update_recommended_version.py,sha256=IYkfLXIprOW1jguZeELcGP1iBPuj-b53R-FTqKulMl8,4204
|
63
63
|
reconcile/ocm_upgrade_scheduler_org_updater.py,sha256=49Ss6sp9_n5F9914gXb-uEap4Vm2t-KPTJRFFViJMIo,4184
|
64
|
-
reconcile/openshift_base.py,sha256=
|
64
|
+
reconcile/openshift_base.py,sha256=AYTXEfQaU91PRpNJKunf0PILL_zAJMq6jySYfGHzcNg,49702
|
65
65
|
reconcile/openshift_cluster_bots.py,sha256=eRPYZqWMKFNxLlSN0QG97V5t1iIESQ0BbGaiaQP5VB0,10940
|
66
66
|
reconcile/openshift_clusterrolebindings.py,sha256=QfSy1Ik8eEY5XObc1Q4xyhqyErZenJmbPv_u9wcDNNo,5864
|
67
67
|
reconcile/openshift_groups.py,sha256=fqBQ6ITDOArkC_zOjskmMigdCUDq3wntLZ0NcppXaFc,9414
|
@@ -386,8 +386,8 @@ reconcile/rhidp/sso_client/integration.py,sha256=kA8g7c38ZBSdrRtyfEqy_WgSreD1Pbw
|
|
386
386
|
reconcile/rhidp/sso_client/metrics.py,sha256=Tq7tSOsqL3XdcPUdozxqzSPIodUeOV87UCTqpuuqqhw,1013
|
387
387
|
reconcile/saas_auto_promotions_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
388
388
|
reconcile/saas_auto_promotions_manager/integration.py,sha256=h1RS-rE8_UaVoLV4c9NyfNfjzvHLQcEVwVN_2UxT7T8,6843
|
389
|
-
reconcile/saas_auto_promotions_manager/publisher.py,sha256=
|
390
|
-
reconcile/saas_auto_promotions_manager/s3_exporter.py,sha256=
|
389
|
+
reconcile/saas_auto_promotions_manager/publisher.py,sha256=psrthZGgCQDUO3rwQjKSBMlwcTgfij6sxdebGuxkNv4,2739
|
390
|
+
reconcile/saas_auto_promotions_manager/s3_exporter.py,sha256=IKlVWZmiPnvl7sKeF6JgAlhXZe5CovKTxQc0SNkNSx4,2583
|
391
391
|
reconcile/saas_auto_promotions_manager/subscriber.py,sha256=cLhPlkT71J2LIice3SLmH1WpsqzV46gd0peMxrnqyRw,7452
|
392
392
|
reconcile/saas_auto_promotions_manager/merge_request_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
393
393
|
reconcile/saas_auto_promotions_manager/merge_request_manager/merge_request.py,sha256=BeAJWLow7b4HQyZ9zz398sQkPeIz8chpMkCts2NU27c,1282
|
@@ -397,7 +397,7 @@ reconcile/saas_auto_promotions_manager/merge_request_manager/mr_parser.py,sha256
|
|
397
397
|
reconcile/saas_auto_promotions_manager/merge_request_manager/reconciler.py,sha256=nst5ZynEQs9Hy9Z2DAjN8_ALIS_5XnrbJh7KG4YVRrE,7789
|
398
398
|
reconcile/saas_auto_promotions_manager/merge_request_manager/renderer.py,sha256=Z2G4wMQB3DLTuMlH_MGURGR4uLyh-6RnksQJzdym5VQ,6960
|
399
399
|
reconcile/saas_auto_promotions_manager/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
400
|
-
reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py,sha256=
|
400
|
+
reconcile/saas_auto_promotions_manager/utils/saas_files_inventory.py,sha256=ZNxwqp9kdUSoxb3kTdM4KrtPyd3V5O4jMfjrVT2IJfs,7605
|
401
401
|
reconcile/skupper_network/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
402
402
|
reconcile/skupper_network/integration.py,sha256=178Q9RSYuZ9NmrCK4jRMLMekrewUaaRdclccI6zBsQ8,10786
|
403
403
|
reconcile/skupper_network/models.py,sha256=DNTI7HZv-rqY42GIIxyRuvroHLvdH6rJerjIq9lj3RU,6663
|
@@ -523,7 +523,7 @@ reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_
|
|
523
523
|
reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_content_single_target.py,sha256=6g4s2c--W4l_PMTcCA_8aNM85YejwDZttQOz5Iowido,1908
|
524
524
|
reconcile/test/saas_auto_promotions_manager/merge_request_manager/renderer/test_json_path_selector.py,sha256=k_jA4x_9fRGGAT1T0aeAFiZwZ7zlDZpPPgqMDeuR7y8,2189
|
525
525
|
reconcile/test/saas_auto_promotions_manager/subscriber/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
526
|
-
reconcile/test/saas_auto_promotions_manager/subscriber/conftest.py,sha256=
|
526
|
+
reconcile/test/saas_auto_promotions_manager/subscriber/conftest.py,sha256=5hMe91UEp_GQm49OeTee4ALv_xq2KhWwF6NfzzQwpnc,3101
|
527
527
|
reconcile/test/saas_auto_promotions_manager/subscriber/data_keys.py,sha256=2j4Ue-njmK53Xm4vJScT2MJJeKV7wk9xf_95pmNfLWE,402
|
528
528
|
reconcile/test/saas_auto_promotions_manager/subscriber/test_content_hash.py,sha256=viw-p42vDOC2telE5lelssRBL7V35aNJ1qUg6D-QGWw,4546
|
529
529
|
reconcile/test/saas_auto_promotions_manager/subscriber/test_diff.py,sha256=BkxCoWBlUahY5Vq36FX_t_UyIdzIc64CumzAd3imUAQ,4529
|
@@ -533,10 +533,10 @@ reconcile/test/saas_auto_promotions_manager/subscriber/test_multiple_publishers_
|
|
533
533
|
reconcile/test/saas_auto_promotions_manager/subscriber/test_single_channel_with_single_publisher.py,sha256=YDXCzrclRyKRW7qRBg9GB2HinJP_HPqzTcWMGD1rbFI,9452
|
534
534
|
reconcile/test/saas_auto_promotions_manager/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
535
535
|
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
536
|
-
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_multiple_publishers_for_single_channel.py,sha256=
|
537
|
-
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_use_target_config_hash.py,sha256=
|
538
|
-
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_with_auto_promote.py,sha256=
|
539
|
-
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_without_auto_promote.py,sha256=
|
536
|
+
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_multiple_publishers_for_single_channel.py,sha256=jX8ade2615gRYiJ_Bui4F2kvv3rUyod5sdiMFhzcnsw,2168
|
537
|
+
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_use_target_config_hash.py,sha256=TThr7UeF8k7lNBeknknEcE4H9z-_K4jKdzNA_SqFKoY,1948
|
538
|
+
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_with_auto_promote.py,sha256=OSSdVEQ72npDRrbkx5JHhXus-0ku699wG7ecsco4axM,2545
|
539
|
+
reconcile/test/saas_auto_promotions_manager/utils/saas_files_inventory/test_saas_files_without_auto_promote.py,sha256=6GoZ6ogpXBVYlRwag2wu9Z-1ES9LzyPxMqZkcX7oTA0,2040
|
540
540
|
reconcile/typed_queries/__init__.py,sha256=rRk4CyslLsBr4vAh1pIPgt6s3P4R1M9NSEPLnyQgBpk,61
|
541
541
|
reconcile/typed_queries/alerting_services_settings.py,sha256=sX6s8GY-BB0UHogMC1ICeREVab-IYrNm1c-hqMGEdYQ,864
|
542
542
|
reconcile/typed_queries/app_interface_custom_messages.py,sha256=5HWr68_kb4bEL8pDCIH0ez6GOrdwdbGF6w88xV0_Ccs,718
|
@@ -764,8 +764,8 @@ tools/test/test_app_interface_metrics_exporter.py,sha256=SX7qL3D1SIRKFo95FoQztvf
|
|
764
764
|
tools/test/test_qontract_cli.py,sha256=UEwAW7PA_GIrbqzaLxpkCxbuVjEFLNvnVG-6VyoCGIc,4147
|
765
765
|
tools/test/test_sd_app_sre_alert_report.py,sha256=v363r9zM7__0kR5K6mvJoGFcM9BvE33fWAayrqkpojA,2116
|
766
766
|
tools/test/test_sre_checkpoints.py,sha256=SKqPPTl9ua0RFdSSofnoQX-JZE6dFLO3LRhfQzqtfh8,2607
|
767
|
-
qontract_reconcile-0.10.
|
768
|
-
qontract_reconcile-0.10.
|
769
|
-
qontract_reconcile-0.10.
|
770
|
-
qontract_reconcile-0.10.
|
771
|
-
qontract_reconcile-0.10.
|
767
|
+
qontract_reconcile-0.10.1rc722.dist-info/METADATA,sha256=D6uS6jwPWUkVI1yrzGcBQE91CIF3igTnWPn_b5dRJ-4,2382
|
768
|
+
qontract_reconcile-0.10.1rc722.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
769
|
+
qontract_reconcile-0.10.1rc722.dist-info/entry_points.txt,sha256=rIxI5zWtHNlfpDeq1a7pZXAPoqf7HG32KMTN3MeWK_8,429
|
770
|
+
qontract_reconcile-0.10.1rc722.dist-info/top_level.txt,sha256=l5ISPoXzt0SdR4jVdkfa7RPSKNc8zAHYWAnR-Dw8Ey8,24
|
771
|
+
qontract_reconcile-0.10.1rc722.dist-info/RECORD,,
|
reconcile/openshift_base.py
CHANGED
@@ -416,7 +416,7 @@ def apply(
|
|
416
416
|
except FieldIsImmutableError:
|
417
417
|
# Add more resources types to the list when you're
|
418
418
|
# sure they're safe.
|
419
|
-
if resource_type not in {"Route", "Service", "Secret"}:
|
419
|
+
if resource_type not in {"Route", "Service", "Secret", "Job"}:
|
420
420
|
raise
|
421
421
|
oc.delete(namespace=namespace, kind=resource_type, name=resource.name)
|
422
422
|
oc.apply(namespace=namespace, resource=annotated)
|
@@ -32,11 +32,14 @@ class Publisher:
|
|
32
32
|
uid: str,
|
33
33
|
saas_name: str,
|
34
34
|
saas_file_path: str,
|
35
|
+
app_name: str,
|
35
36
|
namespace_name: str,
|
36
37
|
resource_template_name: str,
|
37
38
|
target_name: Optional[str],
|
38
39
|
cluster_name: str,
|
39
40
|
auth_code: Optional[HasSecret],
|
41
|
+
publish_job_logs: Optional[bool],
|
42
|
+
has_subscriber: bool = True,
|
40
43
|
):
|
41
44
|
self._ref = ref
|
42
45
|
self._repo_url = repo_url
|
@@ -47,10 +50,13 @@ class Publisher:
|
|
47
50
|
self.uid = uid
|
48
51
|
self.saas_name = saas_name
|
49
52
|
self.saas_file_path = saas_file_path
|
53
|
+
self.app_name = app_name
|
50
54
|
self.namespace_name = namespace_name
|
51
55
|
self.resource_template_name = resource_template_name
|
52
|
-
self.target_name = target_name if target_name else "
|
56
|
+
self.target_name = target_name if target_name else "None"
|
53
57
|
self.cluster_name = cluster_name
|
58
|
+
self.publish_job_logs = bool(publish_job_logs)
|
59
|
+
self.has_subscriber = has_subscriber
|
54
60
|
|
55
61
|
def fetch_commit_shas_and_deployment_info(
|
56
62
|
self, vcs: VCS, deployment_state: PromotionState
|
@@ -62,7 +62,7 @@ class S3Exporter:
|
|
62
62
|
data: dict[str, dict] = {}
|
63
63
|
for publisher in publishers:
|
64
64
|
publisher_data = PublisherData.from_publisher(publisher)
|
65
|
-
key = f"{publisher.saas_name}/{publisher.resource_template_name}/{publisher.target_name}/{publisher.cluster_name}/{publisher.namespace_name}"
|
65
|
+
key = f"{publisher.app_name}/{publisher.saas_name}/{publisher.resource_template_name}/{publisher.target_name}/{publisher.cluster_name}/{publisher.namespace_name}/{publisher.publish_job_logs}"
|
66
66
|
data[key] = {
|
67
67
|
"commit_sha": publisher_data.commit_sha,
|
68
68
|
"deployment_state": publisher_data.deployment_state.value,
|
@@ -34,6 +34,10 @@ class SaasFilesInventory:
|
|
34
34
|
self._assemble_publishers()
|
35
35
|
self._remove_unsupported()
|
36
36
|
|
37
|
+
@property
|
38
|
+
def publishers_with_subscribers(self) -> list[Publisher]:
|
39
|
+
return [p for p in self.publishers if p.has_subscriber]
|
40
|
+
|
37
41
|
def _assemble_publishers(self) -> None:
|
38
42
|
for saas_file in self._saas_files:
|
39
43
|
for resource_template in saas_file.resource_templates:
|
@@ -54,12 +58,15 @@ class SaasFilesInventory:
|
|
54
58
|
repo_url=resource_template.url,
|
55
59
|
saas_file_path=saas_file.path,
|
56
60
|
saas_name=saas_file.name,
|
61
|
+
app_name=saas_file.app.name,
|
57
62
|
namespace_name=target.namespace.name,
|
58
63
|
cluster_name=target.namespace.cluster.name,
|
59
64
|
resource_template_name=resource_template.name,
|
60
65
|
target_name=target.name,
|
66
|
+
publish_job_logs=saas_file.publish_job_logs,
|
61
67
|
auth_code=auth_code,
|
62
68
|
)
|
69
|
+
|
63
70
|
has_subscriber = False
|
64
71
|
for publish_channel in target.promotion.publish or []:
|
65
72
|
if publish_channel not in self._channels_by_name:
|
@@ -71,8 +78,9 @@ class SaasFilesInventory:
|
|
71
78
|
self._channels_by_name[publish_channel].publishers.append(
|
72
79
|
publisher
|
73
80
|
)
|
74
|
-
|
75
|
-
|
81
|
+
|
82
|
+
publisher.has_subscriber = has_subscriber
|
83
|
+
self.publishers.append(publisher)
|
76
84
|
|
77
85
|
def _assemble_subscribers_with_auto_promotions(self) -> None:
|
78
86
|
for saas_file in self._saas_files:
|
@@ -52,8 +52,11 @@ def subscriber_builder(
|
|
52
52
|
namespace_name="",
|
53
53
|
saas_name="",
|
54
54
|
saas_file_path="",
|
55
|
+
app_name="",
|
55
56
|
resource_template_name="",
|
56
57
|
target_name=None,
|
58
|
+
publish_job_logs=True,
|
59
|
+
has_subscriber=True,
|
57
60
|
auth_code=None,
|
58
61
|
)
|
59
62
|
publisher.commit_sha = publisher_data[REAL_WORLD_SHA]
|
@@ -62,5 +62,7 @@ def test_multiple_publishers_for_single_channel(
|
|
62
62
|
},
|
63
63
|
])
|
64
64
|
inventory = SaasFilesInventory(saas_files=saas_files)
|
65
|
-
|
65
|
+
|
66
|
+
assert len(inventory.publishers) == 3
|
67
|
+
assert len(inventory.publishers_with_subscribers) == 2
|
66
68
|
assert len(inventory.subscribers) == 1
|
@@ -56,6 +56,7 @@ def test_use_target_config_hash(
|
|
56
56
|
},
|
57
57
|
])
|
58
58
|
inventory = SaasFilesInventory(saas_files=saas_files)
|
59
|
-
assert len(inventory.publishers) ==
|
59
|
+
assert len(inventory.publishers) == 2
|
60
|
+
assert len(inventory.publishers_with_subscribers) == 1
|
60
61
|
assert len(inventory.subscribers) == 1
|
61
62
|
assert inventory.subscribers[0]._use_target_config_hash
|
@@ -67,6 +67,7 @@ def test_single_channel(
|
|
67
67
|
},
|
68
68
|
])
|
69
69
|
inventory = SaasFilesInventory(saas_files=saas_files)
|
70
|
-
assert len(inventory.publishers) ==
|
70
|
+
assert len(inventory.publishers) == 2
|
71
|
+
assert len(inventory.publishers_with_subscribers) == 1
|
71
72
|
assert len(inventory.subscribers) == 1
|
72
73
|
assert not inventory.subscribers[0]._use_target_config_hash
|
@@ -59,5 +59,6 @@ def test_saas_files_without_auto_promote(
|
|
59
59
|
},
|
60
60
|
])
|
61
61
|
inventory = SaasFilesInventory(saas_files=saas_files)
|
62
|
-
assert len(inventory.publishers) ==
|
62
|
+
assert len(inventory.publishers) == 2
|
63
|
+
assert len(inventory.publishers_with_subscribers) == 0
|
63
64
|
assert len(inventory.subscribers) == 0
|
File without changes
|
File without changes
|
{qontract_reconcile-0.10.1rc720.dist-info → qontract_reconcile-0.10.1rc722.dist-info}/top_level.txt
RENAMED
File without changes
|